/* ===== CANDIDATE BUTTON & MODAL CSS ===== */

/* Stili per il bottone mobile candidate nel menu mobile */
/* NOTA: Gli stili mobile sono gestiti in mobile-buttons-positioning-fix.css */
.enterprise-mobile-candidate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.025em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.enterprise-mobile-candidate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    text-decoration: none;
}

.enterprise-mobile-candidate i {
    font-size: 1rem;
}

/* ===== CANDIDATE MODAL CSS ===== */
.candidate-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.candidate-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.candidate-modal {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 20px;
    padding: 0;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    transform: scale(0.8) translateY(50px);
    transition: transform 0.3s ease;
}

.candidate-modal-overlay.show .candidate-modal {
    transform: scale(1) translateY(0);
}

.candidate-modal-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 20px 20px 0 0;
    position: relative;
    overflow: hidden;
}

.candidate-modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
    100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
}

.candidate-modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.candidate-modal-title i {
    font-size: 1.5rem;
}

.candidate-modal-subtitle {
    font-size: 1rem;
    margin: 8px 0 0 0;
    opacity: 0.9;
    font-weight: 400;
}

.candidate-modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.candidate-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.candidate-modal-content {
    padding: 30px;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

/* ===== FORM STYLES ===== */
.candidate-form {
    display: grid;
    gap: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    color: #e2e8f0;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.file-upload-container {
    position: relative;
    cursor: pointer;
    width: 100%;
}

.file-upload-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 1;
}

.file-upload-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    background: rgba(16, 185, 129, 0.1);
    border: 2px dashed rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    color: #10b981;
    font-weight: 600;
    transition: all 0.3s ease;
    min-height: 60px;
    cursor: pointer;
    position: relative;
    z-index: 2;
    pointer-events: none; /* Permette al click di passare al container */
}

.file-upload-container:hover .file-upload-display {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.5);
    transform: translateY(-2px);
}

.file-upload-icon {
    font-size: 1.5rem;
}

.file-upload-text {
    text-align: center;
}

.file-upload-filename {
    color: #e2e8f0;
    font-size: 0.9rem;
    margin-top: 8px;
    word-break: break-word;
}

.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 5px;
}

.char-counter.warning {
    color: #f59e0b;
}

.char-counter.error {
    color: #ef4444;
}

/* ===== SUBMIT BUTTON ===== */
.candidate-submit-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.candidate-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

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

.candidate-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.candidate-submit-btn .loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

.candidate-submit-btn.loading .loading-spinner {
    display: inline-block;
}

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

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .candidate-modal {
        margin: 10px;
        max-height: calc(100vh - 40px);
    }
    
    .candidate-modal-header {
        padding: 20px 25px;
    }
    
    .candidate-modal-title {
        font-size: 1.5rem;
    }
    
    .candidate-modal-content {
        padding: 25px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .candidate-form {
        gap: 20px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 12px 14px;
    }
}

@media (max-width: 480px) {
    .candidate-modal {
        margin: 5px;
        border-radius: 15px;
    }
    
    .candidate-modal-header {
        padding: 15px 20px;
        border-radius: 15px 15px 0 0;
    }
    
    .candidate-modal-title {
        font-size: 1.3rem;
    }
    
    .candidate-modal-content {
        padding: 20px 15px;
    }
    
    .candidate-submit-btn {
        padding: 14px 28px;
        font-size: 1rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }
}