/* Affiliate Application Form Styles */

.affiliate-application-container {
    max-width: 650px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Josefin Sans', sans-serif;
}

.affiliate-form {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 24px;
}

.field-title {
    display: block;
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
    margin-bottom: 8px;
    font-family: 'Josefin Sans', sans-serif;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: #f3f4f6;
    font-family: 'Josefin Sans', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #7C3AED;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-control::placeholder {
    color: #9ca3af;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.field-description {
    font-size: 13px;
    color: #6b7280;
    margin-top: 6px;
    margin-bottom: 0;
    line-height: 1.5;
    font-family: 'Josefin Sans', sans-serif;
}

.phone-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
}

.country-code {
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-right: none;
    border-radius: 6px 0 0 6px;
    padding: 12px 16px;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 15px;
    font-family: 'Josefin Sans', sans-serif;
}

.phone-input {
    border-radius: 0 6px 6px 0 !important;
    flex: 1;
}

.terms-group {
    margin-top: 20px;
    margin-bottom: 20px;
}

.terms-text {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
    font-family: 'Josefin Sans', sans-serif;
}

.terms-link {
    color: #7C3AED;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.terms-link:hover {
    color: #6d28d9;
    text-decoration: underline;
}

.submit-button {
    width: 100%;
    padding: 14px 24px;
    background-color: #7C3AED;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Josefin Sans', sans-serif;
    text-transform: none;
}

.submit-button:hover {
    background-color: #6d28d9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.popup-content {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.popup-close:hover {
    color: #1a1a1a;
}

.popup-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.error-icon {
    background-color: #fee2e2;
    color: #dc2626;
}

.popup-message {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    font-family: 'Josefin Sans', sans-serif;
}

/* Responsive Design */
@media (max-width: 640px) {
    .affiliate-application-container {
        padding: 10px;
    }
    
    .affiliate-form {
        padding: 20px;
    }
    
    .form-control {
        font-size: 14px;
    }
    
    .field-title {
        font-size: 15px;
    }
    
    .field-description {
        font-size: 12px;
    }
}

/* Loading State */
.submit-button.loading {
    position: relative;
    color: transparent;
}

.submit-button.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

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