/* Modal Styles */
.cups-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.cups-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 90%;
    max-width: 600px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.cups-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.cups-close:hover {
    color: #000;
}

/* Global Message Styles */
#cups-global-message {
    margin: 0 0 20px 0;
    padding: 12px 15px;
    border-radius: 4px;
    text-align: center;
    display: none;
}

.cups-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block !important;
}

.cups-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block !important;
}

/* Form Styles */
.cups-form-group {
    margin-bottom: 20px;
}

.cups-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.cups-form-group input[type="text"],
.cups-form-group input[type="email"],
.cups-form-group input[type="number"],
.cups-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

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

.cups-captcha {
    display: flex;
    align-items: center;
    gap: 10px;
}

#cups-captcha-question {
    font-weight: bold;
    background: #f0f0f0;
    padding: 8px 12px;
    border-radius: 4px;
    min-width: 150px;
}

#cups-captcha-answer {
    width: 100px !important;
}

.cups-form-group small {
    display: block;
    margin-top: 5px;
}

/* Button Styles */
.cups-open-modal {
    background: #007cba;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.cups-open-modal:hover {
    background: #005a87;
}

#cups-submit-btn {
    background: #28a745;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
}

#cups-submit-btn:hover:not(:disabled) {
    background: #218838;
}

#cups-submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Job Contact Info Styles */
.job-contact-info {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #007cba;
    border-radius: 4px;
}

.job-contact-info h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
}

.job-contact-info p {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.job-contact-info a {
    color: #007cba;
    text-decoration: none;
    font-weight: bold;
}

.job-contact-info a:hover {
    text-decoration: underline;
}

.job-contact-info small {
    color: #666;
    font-style: italic;
}

/* Style for saved form data indication */
.cups-form-group input:not(:placeholder-shown),
.cups-form-group textarea:not(:placeholder-shown) {
    border-left: 3px solid #007cba;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cups-modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }
    
    .cups-captcha {
        flex-direction: column;
        align-items: flex-start;
    }
    
    #cups-captcha-answer {
        width: 100% !important;
    }
}

/* Message styles */
#cups-global-message {
    display: none;
    padding: 12px 24px;
    margin: 0;
    border-radius: 8px;
    animation: fadeIn 0.3s ease;
}

#cups-global-message.success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

#cups-global-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

#cups-global-message.warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

#cups-global-message p {
    margin: 0;
    font-size: 0.95em;
}

/* Uploading state */
.uploading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #007cba;
    font-weight: 500;
}

.uploading .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 124, 186, 0.3);
    border-radius: 50%;
    border-top-color: #007cba;
    animation: cups-spin 1s linear infinite;
}

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

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

/* Responsive adjustments */
@media (max-width: 850px) {
    #cups-global-message {
        padding: 10px 20px;
        margin: 0 20px;
        margin-top: 10px;
    }
}

/* Message styles */
#cups-global-message {
    display: none;
    padding: 12px 24px;
    margin: 0 24px;
    border-radius: 8px;
    animation: fadeIn 0.3s ease;
}

#cups-global-message.success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

#cups-global-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

#cups-global-message.warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

#cups-global-message p {
    margin: 0;
    font-size: 0.95em;
}

/* Uploading state */
.uploading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #007cba;
    font-weight: 500;
}

.uploading .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 124, 186, 0.3);
    border-radius: 50%;
    border-top-color: #007cba;
    animation: cups-spin 1s linear infinite;
}

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

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

/* Responsive adjustments */
@media (max-width: 850px) {
    #cups-global-message {
        padding: 10px 20px;
        margin: 0 20px;
        margin-top: 10px;
    }
}