/* Talent Registration Form Styles */

/* Base form styling */
.talent-registration-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Floating label animations */
.floating-label {
    position: relative;
}

.floating-label input,
.floating-label select,
.floating-label textarea {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 12px 8px;
    font-size: 16px;
    background: #fff;
    transition: all 0.2s ease;
    width: 100%;
}

.floating-label input:focus,
.floating-label select:focus,
.floating-label textarea:focus {
    outline: none;
    border-color: #f77329;
    box-shadow: 0 0 0 3px rgba(247, 115, 41, 0.1);
}

.floating-label label {
    position: absolute;
    top: 16px;
    left: 12px;
    font-size: 16px;
    color: #64748b;
    transition: all 0.2s ease;
    pointer-events: none;
    background: #fff;
    padding: 0 4px;
}

.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label,
.floating-label select:focus + label,
.floating-label select:not([value=""]) + label,
.floating-label textarea:focus + label,
.floating-label textarea:not(:placeholder-shown) + label {
    top: -8px;
    font-size: 14px;
    color: #f77329;
    font-weight: 500;
}

/* Input group floating labels */
.floating-label .input-group {
    position: relative;
}

.floating-label .input-group input {
    border-right: none;
    border-radius: 8px 0 0 8px;
}

.floating-label .input-group .input-group-append .input-group-text {
    border: 2px solid #e2e8f0;
    border-left: none;
    border-radius: 0 8px 8px 0;
    background: #f8fafc;
    color: #64748b;
    font-weight: 500;
}

.floating-label .input-group input:focus {
    border-color: #f77329;
    box-shadow: 0 0 0 3px rgba(247, 115, 41, 0.1);
}

.floating-label .input-group input:focus + .input-group-append .input-group-text {
    border-color: #f77329;
}

.floating-label .input-group input:focus ~ label,
.floating-label .input-group input:not(:placeholder-shown) ~ label {
    top: -8px;
    font-size: 14px;
    color: #f77329;
    font-weight: 500;
}

/* Input with unit styling */
.floating-label .input-unit {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-weight: 500;
    font-size: 14px;
    background: #f8fafc;
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 1;
}

/* Adjust input padding when unit is present */
.floating-label:has(.input-unit) input {
    padding-right: 50px;
}

/* Ensure label works with input-unit */
.floating-label input:focus ~ label,
.floating-label input:not(:placeholder-shown) ~ label {
    top: -8px;
    font-size: 14px;
    color: #f77329;
    font-weight: 500;
}

/* File upload styling */
.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafc;
    position: relative;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: #f77329;
    background: #fef7f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(247, 115, 41, 0.15);
}

.upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-placeholder i {
    color: #94a3b8;
    margin-bottom: 16px;
}

.upload-text {
    font-size: 18px;
    color: #475569;
    margin: 16px 0 8px;
    font-weight: 500;
}

.upload-requirements {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}

/* Preview styling */
.upload-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.preview-item {
    position: relative;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    background: #fff;
    text-align: center;
}

.preview-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}

.preview-item i {
    font-size: 32px;
    color: #64748b;
    margin-bottom: 8px;
}

.file-name {
    font-size: 12px;
    color: #475569;
    word-break: break-word;
    display: block;
    margin-bottom: 8px;
}

.remove-file {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.remove-file:hover {
    background: #dc2626;
}

/* Skills input styling */
.skills-container {
    margin-bottom: 16px;
}

.skills-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.skills-input-group input {
    flex: 1;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.suggestion-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.suggestion-tag:hover {
    background: #f77329;
    color: white;
    border-color: #f77329;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(247, 115, 41, 0.2);
}

.selected-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 32px;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.skill-tag {
    background: #10b981;
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.remove-skill {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    margin: 0;
    font-size: 12px;
}

.remove-skill:hover {
    color: #fecaca;
}

/* Validation states */
.form-control.is-valid {
    border-color: #10b981;
}

.form-control.is-invalid {
    border-color: #ef4444;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 6px;
    font-size: 14px;
    color: #ef4444;
}

/* Tooltips */
.info-tooltip {
    position: relative;
    display: inline-block;
    margin-left: 8px;
}

.info-tooltip .fas {
    color: #64748b;
    cursor: help;
}

.info-tooltip .tooltip-text {
    visibility: hidden;
    width: 300px;
    background-color: #1f2937;
    color: #fff;
    text-align: left;
    border-radius: 8px;
    padding: 12px 16px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -150px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
    line-height: 1.4;
}

.info-tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

.info-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Responsive design */
@media (max-width: 768px) {
    .floating-label input,
    .floating-label select,
    .floating-label textarea {
        padding: 12px 8px 6px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .floating-label label {
        top: 12px;
        left: 8px;
        font-size: 16px;
    }
    
    .floating-label input:focus + label,
    .floating-label input:not(:placeholder-shown) + label,
    .floating-label select:focus + label,
    .floating-label select:not([value=""]) + label,
    .floating-label textarea:focus + label,
    .floating-label textarea:not(:placeholder-shown) + label {
        top: -8px;
        font-size: 12px;
    }
    
    .upload-area {
        padding: 24px 16px;
    }
    
    .upload-text {
        font-size: 16px;
    }
    
    .upload-preview {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .skills-input-group {
        flex-direction: column;
    }
    
    .suggestion-tags {
        justify-content: center;
    }
    
    .info-tooltip .tooltip-text {
        width: 250px;
        margin-left: -125px;
    }
}

/* Print styles */
@media print {
    .talent-registration-container {
        background: white !important;
    }
    
    .form-navigation,
    .progress-container,
    .upload-area,
    .btn {
        display: none !important;
    }
}
