/* ==========================================
   VIPPS PAYMENT PAGE STYLES
   ========================================== */

/* Payment Section */
.payment-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #ad0c2c 0%, #8a0924 100%);
    padding: 90px 0 0 0;
    position: relative;
}

.payment-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem 2rem 1rem;
    position: relative;
    z-index: 2;
}

/* Wave Elements */
.payment-section .wave-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: 1;
}

.payment-section .wave-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: 1;
}

/* Payment Header */
.payment-header {
    text-align: center;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out;
}

.vipps-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.2));
}

.payment-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 0.35rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.payment-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

/* Order Summary */
.order-summary {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.summary-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
}

.order-items {
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 0;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.item-name {
    font-weight: 600;
    color: var(--color-text-primary);
    font-size: 1rem;
}

.item-description {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.item-price {
    font-weight: 700;
    color: var(--color-text-primary);
    font-size: 1.05rem;
    white-space: nowrap;
}

.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0 0;
}

.total-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text-primary);
    font-family: 'Montserrat', sans-serif;
}

.total-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-brand-red);
    font-family: 'Montserrat', sans-serif;
}

/* Delivery Options */
.delivery-options {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 0.6s ease-out 0.15s backwards;
}

.delivery-toggle {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.toggle-option {
    flex: 1;
    cursor: pointer;
}

.toggle-option input[type="radio"] {
    display: none;
}

.toggle-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    font-weight: 600;
    color: var(--color-text-secondary);
    transition: all 0.3s ease;
    text-align: center;
    font-size: 0.95rem;
}

.toggle-option:hover .toggle-button {
    border-color: rgba(255, 91, 36, 0.3);
    background: rgba(255, 91, 36, 0.05);
}

.toggle-option input[type="radio"]:checked + .toggle-button {
    background: #FF5B24;
    border-color: #FF5B24;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 91, 36, 0.3);
}

.toggle-button svg {
    flex-shrink: 0;
}

.delivery-fields {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 2px solid rgba(0, 0, 0, 0.1);
    animation: fadeInDown 0.3s ease-out;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0.75rem;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Payment Form */
.payment-form {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.form-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #FF5B24;
    box-shadow: 0 0 0 3px rgba(255, 91, 36, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-help {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

/* Vipps Button */
.vipps-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.9rem 1.5rem;
    background: #FF5B24;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(255, 91, 36, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    margin-top: 0.75rem;
}

.vipps-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 91, 36, 0.4);
    background: #FF6B34;
}

.vipps-btn:active {
    transform: translateY(0);
}

.vipps-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    margin-top: 1rem;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid rgba(255, 91, 36, 0.2);
    border-top-color: #FF5B24;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-state p {
    color: var(--color-text-primary);
    font-weight: 600;
    font-size: 1.05rem;
}

/* Messages */
.error-message,
.success-message {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-weight: 600;
    animation: slideIn 0.3s ease-out;
}

.error-message {
    background: rgba(220, 53, 69, 0.1);
    border: 2px solid #DC3545;
    color: #DC3545;
}

.success-message {
    background: rgba(40, 167, 69, 0.1);
    border: 2px solid #28A745;
    color: #28A745;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Info Section */
.info-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.info-card svg {
    flex-shrink: 0;
    color: #FF5B24;
    width: 24px;
    height: 24px;
}

.info-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 0.25rem;
    font-family: 'Montserrat', sans-serif;
}

.info-card p {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.4;
}

.info-card a {
    color: #FF5B24;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.info-card a:hover {
    color: #FF6B34;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer Logo Override - Desktop only */
@media (min-width: 769px) {
    .footer-logo {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .footer-column {
        align-items: flex-start !important;
        text-align: left !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .payment-section {
        padding: 80px 0 0 0;
    }

    .payment-container {
        padding: 0 1rem 1.5rem 1rem;
    }

    .vipps-logo {
        width: 50px;
        height: 50px;
    }

    .payment-title {
        font-size: 1.5rem;
    }

    .payment-subtitle {
        font-size: 0.9rem;
    }

    .order-summary,
    .payment-form {
        padding: 1rem;
    }

    .summary-title,
    .form-title {
        font-size: 1.1rem;
    }

    .vipps-btn {
        padding: 0.8rem 1.25rem;
        font-size: 0.95rem;
    }

    .order-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .item-price {
        align-self: flex-start;
    }

    .delivery-toggle {
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .payment-container {
        padding: 0 0.75rem 1.5rem 0.75rem;
    }

    .order-summary,
    .payment-form {
        padding: 1rem;
    }

    .total-amount {
        font-size: 1.2rem;
    }
}
