/**
 * DuoPharma Signup Modal - Modern Luxurious Design
 * Minimalistic and elegant styling
 */

/* Modal Overlay & Container */
.duopharma-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.duopharma-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.duopharma-modal-container {
    position: relative;
    background: #ffffff;
    border-radius: 24px;
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Prevent body scroll when modal is open */
body.duopharma-modal-open {
    overflow: hidden;
}

/* Close Button */
.duopharma-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.duopharma-modal-close:hover {
    color: #333;
}

/* Modal Content */
.duopharma-modal-content {
    padding: 48px 40px;
}

.duopharma-modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #dc143c 0%, #a00d2a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.duopharma-modal-icon svg {
    width: 32px;
    height: 32px;
    color: white;
}

.duopharma-modal-title {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    margin: 0 0 12px 0;
    font-family: 'Fira Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.duopharma-modal-description {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    text-align: center;
    margin: 0 0 32px 0;
}

/* Form Styling */
.duopharma-signup-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.duopharma-form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.duopharma-form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    font-family: 'Fira Sans', sans-serif;
}

.duopharma-form-group input,
.duopharma-form-group select {
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-family: 'Fira Sans', sans-serif;
    background: #fafafa;
}

.duopharma-form-group input:focus,
.duopharma-form-group select:focus {
    outline: none;
    border-color: #dc143c;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(220, 20, 60, 0.1);
}

.duopharma-form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Username Feedback */
.username-feedback {
    font-size: 13px;
    margin-top: 6px;
    display: block;
}

.username-feedback.available {
    color: #10b981;
}

.username-feedback.unavailable {
    color: #ef4444;
}

/* Form Divider */
.duopharma-form-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 8px 0;
}

.duopharma-form-divider::before,
.duopharma-form-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.duopharma-form-divider span {
    padding: 0 16px;
    font-size: 13px;
    color: #999;
    font-weight: 500;
}

/* Error Message */
.duopharma-form-error {
    padding: 12px 16px;
    background: #fff0f0;
    border: 1px solid #ffcccb;
    border-radius: 8px;
    color: #c00;
    font-size: 14px;
    text-align: center;
}

/* Button Styling */
.duopharma-btn {
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Fira Sans', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.duopharma-btn-primary {
    background: linear-gradient(135deg, #dc143c 0%, #a00d2a 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.3);
}

.duopharma-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 20, 60, 0.4);
}

.duopharma-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Spinner */
.spinner {
    animation: rotate 1s linear infinite;
    width: 20px;
    height: 20px;
}

.spinner circle {
    stroke: white;
    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;
    }
}

/* Form Footer */
.duopharma-form-footer {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin: 8px 0 0 0;
    line-height: 1.5;
}

/* Success Message */
.duopharma-success-message {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.3s ease-out;
}

.success-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.duopharma-success-message h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px 0;
}

.duopharma-success-message p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 600px) {
    .duopharma-modal-container {
        width: 95%;
        border-radius: 20px;
    }
    
    .duopharma-modal-content {
        padding: 36px 24px;
    }
    
    .duopharma-modal-title {
        font-size: 24px;
    }
    
    .duopharma-form-group input,
    .duopharma-form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}