/**
 * One Page Checkout Pro - Frontend Styles
 * Beautiful modern design with premium aesthetics
 */

/* Main Wrapper */
.opc-checkout-wrapper {
    max-width: 650px;
    
}

.opc-checkout-container {
    background: #f0f2f4;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.15);
    padding: 20px;
    position: relative;
    border: 1px solid rgba(102, 126, 234, 0.44);
    overflow: hidden;
}

.opc-checkout-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

/* Form Title */
.opc-form-title {
    font-size: 22px;
    font-weight: 800;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    position: relative;
    padding-bottom: 15px;
}

.opc-form-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Product Card */
.opc-product-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.35);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.opc-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 45px rgba(102, 126, 234, 0.45);
}

.opc-product-selected {
    position: absolute;
    top: 15px;
    right: 15px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.opc-checkmark {
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3));
}

.opc-product-image {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.5);
}

.opc-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.opc-product-info {
    flex: 1;
    color: #ffffff;
}

.opc-product-name {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.opc-product-price {
    margin: 0;
}

.opc-price-amount {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    letter-spacing: -0.5px;
}

/* Form Groups */


.opc-form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
    letter-spacing: -0.2px;
}

.opc-field-icon {
    width: 22px;
    height: 22px;
    color: #667eea;
    filter: drop-shadow(0 1px 2px rgba(102, 126, 234, 0.3));
}

.required {
    color: #ef4444;
    font-size: 18px;
}

/* Form Inputs */
.opc-input,
.opc-select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    color: #1a202c;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.opc-input:hover,
.opc-select:hover {
    border-color: #cbd5e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.opc-input:focus,
.opc-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), 0 4px 12px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.opc-input::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.opc-input.error,
.opc-select.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.opc-error-message {
    display: block;
    color: #ef4444;
    font-size: 13px;
    margin-top: 8px;
    min-height: 18px;
    font-weight: 600;
}

/* Quantity Selector */
.opc-quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.opc-qty-btn {
    width: 50px;
    height: 50px;
    border: 2px solid #667eea;
    background: linear-gradient(145deg, #ffffff 0%, #f7fafc 100%);
    color: #667eea;
    border-radius: 14px;
    font-size: 26px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.opc-qty-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.opc-qty-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.opc-qty-input {
    width: 70px;
    text-align: center;
    padding: 14px 10px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Pricing Breakdown */
.opc-pricing-breakdown {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-radius: 10px;
    padding: 8px 20px 8px 20px;
    margin: 15px 0;
    border: 2px solid #f39c12;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.opc-pricing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    font-size: 16px;
    color: #4a5568;
    font-weight: 600;
}

.opc-pricing-row:not(:last-child) {
    border-bottom: 2px solid #e2e8f0;
}

.opc-total-row {
    font-size: 20px;
    font-weight: 800;
    color: #1a202c;
    padding-top: 18px;
    margin-top: 8px;
}

.opc-total-row span:last-child {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 28px;
    letter-spacing: -0.5px;
}

/* Submit Button */
.opc-submit-btn {
    width: 100%;
    padding: 20px 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 16px;
    font-size: 19px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.opc-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.opc-submit-btn:hover::before {
    left: 100%;
}

.opc-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 38px rgba(102, 126, 234, 0.5);
}

.opc-submit-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.4);
}

.opc-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.opc-btn-loader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Spinner Animation */
.opc-spinner {
    animation: rotate 1s linear infinite;
}

.opc-spinner .path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }

    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Success Message */
.opc-success-message {
    text-align: center;
    padding: 50px 30px;
}

.opc-success-icon {
    margin-bottom: 25px;
    animation: scaleIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 8px 20px rgba(16, 185, 129, 0.3));
}

.opc-success-message h3 {
    font-size: 28px;
    font-weight: 800;
    color: #10b981;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.opc-success-message p {
    font-size: 17px;
    color: #6b7280;
    font-weight: 500;
}

@keyframes scaleIn {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }

    50% {
        transform: scale(1.15) rotate(10deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 640px) {
    .opc-checkout-container {
        padding: 30px 25px;
        border-radius: 20px;
    }

    .opc-form-title {
        font-size: 26px;
    }

    .opc-product-card {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
    }

    .opc-product-image {
        width: 120px;
        height: 120px;
    }

    .opc-product-name {
        font-size: 18px;
    }

    .opc-price-amount {
        font-size: 24px;
    }

    .opc-pricing-breakdown {
        padding: 20px;
    }

    .opc-submit-btn {
        font-size: 17px;
        padding: 18px 28px;
    }

    .opc-qty-btn {
        width: 45px;
        height: 45px;
    }
}

/* Loading State */
.opc-checkout-form.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Hidden Elements */
.opc-hidden {
    display: none !important;
}

/* Additional Premium Touches */
.opc-input:focus+.opc-error-message,
.opc-select:focus+.opc-error-message {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth transitions for all interactive elements */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}