/**
 * One Click Checkout - Modal Style CSS
 * Clean design matching the provided mockup
 */

/* Main Container */
.ocpc-modal-form {
    display: block;
    width: 100%;
    max-width: 800px;
    margin: 30px 30px 30px auto;
    /* Push to the right */
    border-radius: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.ocpc-form {
    display: block;
    width: 100%;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    border: 1px solid #E5E7EB;
}

/* Header */
.ocpc-modal-header {
    background: #fff;
    padding: 40px 50px 20px;
    text-align: center;
    border-bottom: 1px solid #E5E7EB;
}

.ocpc-modal-header h2 {
    color: #111827;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 15px;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.ocpc-subtitle {
    color: #6B7280;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    font-weight: 400;
}

/* Content Area */
.ocpc-modal-content {
    padding: 40px 50px;
    background: #fff;
}

/* Form Groups */
.ocpc-form-group {
    margin-bottom: 25px;
}

.ocpc-form-group label {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 10px;
    text-align: left;
}

.ocpc-form-group input[type="text"],
.ocpc-form-group input[type="email"],
.ocpc-form-group input[type="tel"] {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #F9FAFB;
    color: #111827;
}

.ocpc-form-group input::placeholder {
    color: #9CA3AF;
}

.ocpc-form-group input:hover {
    border-color: #D1D5DB;
    background: #fff;
}

.ocpc-form-group input:focus {
    outline: none;
    border-color: #0a6eff;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(10, 110, 255, 0.1);
}

/* Error States */
.ocpc-form-group input.error {
    border-color: #EF4444;
    background: #FEF2F2;
}

.ocpc-form-group input.error:focus {
    border-color: #DC2626;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.ocpc-field-error {
    display: none;
    color: #DC2626;
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
}

.ocpc-field-error.show {
    display: block;
}

/* Error Messages */
.ocpc-errors {
    background: #FEE2E2;
    border: 2px solid #EF4444;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 25px;
    color: #991B1B;
    font-size: 14px;
    font-weight: 500;
}

.ocpc-errors ul {
    margin: 0;
    padding-left: 20px;
}

/* Buttons */
.ocpc-modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 35px;
}

.ocpc-btn {
    flex: 1;
    padding: 16px 32px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

.ocpc-btn-cancel {
    background: #F3F4F6;
    color: #374151;
    border: 2px solid #E5E7EB;
    display: none;
}

.ocpc-btn-cancel:hover {
    background: #E5E7EB;
    transform: translateY(-1px);
}

.ocpc-btn-submit {
    background: #0a6eff;
    color: #fff;
    box-shadow: 0 4px 12px rgba(10, 110, 255, 0.3);
}

.ocpc-btn-submit:hover {
    background: #0a6eff;
    transform: none;
    box-shadow: 0 4px 12px rgba(10, 110, 255, 0.3);
}

.ocpc-btn-submit:active,
.ocpc-btn-cancel:active {
    transform: translateY(0);
}

/* Button Spinner */
.ocpc-spinner-btn {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ocpc-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

/* Loader */
.ocpc-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 16px;
}

.ocpc-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #E5E7EB;
    border-top-color: #0a6eff;
    border-radius: 50%;
    animation: ocpc-spin 0.8s linear infinite;
}

@keyframes ocpc-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success Popup */
.ocpc-success-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.ocpc-success-content {
    background: #fff;
    border-radius: 16px;
    padding: 50px;
    text-align: center;
    max-width: 450px;
    animation: ocpc-popup-in 0.3s ease-out;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes ocpc-popup-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.ocpc-success-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 25px;
}

.ocpc-success-icon svg {
    width: 100%;
    height: 100%;
}

.ocpc-success-icon circle {
    stroke: #0a6eff;
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: ocpc-circle 0.6s ease-out forwards;
}

.ocpc-success-icon path {
    stroke: #0a6eff;
    stroke-width: 2;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: ocpc-check 0.3s 0.4s ease-out forwards;
}

@keyframes ocpc-circle {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes ocpc-check {
    to {
        stroke-dashoffset: 0;
    }
}

.ocpc-success-content h3 {
    font-size: 26px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px;
}

.ocpc-success-content p {
    font-size: 16px;
    color: #6B7280;
    margin: 0 0 30px;
    line-height: 1.6;
}

.ocpc-success-close {
    background: #0a6eff;
    color: #fff;
    border: none;
    padding: 14px 50px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ocpc-success-close:hover {
    background: #0859cc;
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
    .ocpc-modal-form {
        margin: 15px;
    }

    .ocpc-modal-header {
        padding: 30px 25px 15px;
    }

    .ocpc-modal-header h2 {
        font-size: 22px;
    }

    .ocpc-subtitle {
        font-size: 14px;
    }

    .ocpc-modal-content {
        padding: 30px 25px;
    }

    .ocpc-modal-buttons {
        flex-direction: column;
    }

    .ocpc-success-content {
        margin: 20px;
        padding: 35px 25px;
    }

    /* Show Cancel button on mobile */
    .ocpc-btn-cancel {
        display: block;
    }
}