/**
 * Upload CSS Module
 * 
 * File upload and resume management styling for the Zoho Profile Creation Plugin.
 * This module handles all file upload related components and interactions.
 */

/* Resume upload area */
.oeg-resume-upload-area {
    border: 1px solid #e0e0e0;
    padding: 15px;
    margin-bottom: 20px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.oeg-resume-upload-area h5 {
    color: #333;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.oeg-resume-upload-area p {
    margin-bottom: 10px;
}

/* File upload container */
.oeg-file-upload-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* File controls row - keeps controls horizontal */
.oeg-file-controls-row {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
    max-width: fit-content;
}

/* Group file selection controls on the left */
.oeg-file-upload-container .oeg-file-controls-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Override for new candidate container - keep horizontal layout */
#oeg-file-upload-container-new.oeg-file-upload-container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.oeg-file-upload-container input[type="file"] {
    display: none; /* Hide the default file input */
}

.oeg-file-upload-container .choose-file-button {
    background-color: #315C2B;
    color: white;
    padding: 8px 15px;
    height: 38px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.oeg-file-upload-container .choose-file-button:hover {
    background-color: #254622;
}

.oeg-file-upload-container .file-name-display {
    flex-grow: 1;
    max-width: 200px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f0f0f0;
    font-size: 0.9em;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.oeg-file-upload-container .upload-resume-button {
    background-color: #204f70 !important;
    color: white;
    padding: 8px 15px;
    height: 38px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.oeg-file-upload-container .upload-resume-button:hover {
    background-color: #183d5a !important;
}

/* Previous resume container */
.oeg-previous-resume-container {
    margin-bottom: 0px;
    margin-top: 15px;
}

.oeg-previous-resume-container h5 {
    color: #333;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 14px;
}

.oeg-resume-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
}

.oeg-resume-name-display {
    flex-grow: 1;
    padding: 8px;
    font-size: 0.9em;
    color: #333;
    font-weight: 500;
}

.oeg-view-resume-button {
    background-color: #6c757d;
    color: white;
    padding: 10px 12px;
    height: 38px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background-color 0.3s ease;
}

.oeg-view-resume-button:hover {
    background-color: #5a6268;
}

/* Use previous button */
#zoho-profile-creation-container .oeg-use-previous-button {
    background-color: #204f70;
    color: white;
    padding: 10px 20px;
    height: 38px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
    margin-bottom: 35px !important;
    margin-top: 5px;
    margin-left: 5px;
    margin-right: 5px;
}

#zoho-profile-creation-container .oeg-use-previous-button:hover {
    background-color: #183d5a;
}

/* Unified button row for previous resume and file upload */
.oeg-unified-button-row {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.oeg-unified-button-row .oeg-use-previous-button {
    margin-bottom: 35px;
    flex-shrink: 0;
    position: relative;
}

.oeg-unified-button-row .oeg-use-previous-button::after {
    content: '';
    position: absolute;
    top: 10%;
    right: -8px;
    width: 1px;
    height: 80%;
    background-color: #ddd;
}

.oeg-unified-button-row .oeg-file-upload-container {
    flex: 1;
    min-width: 300px;
}