/* KUtimesheet specific styles */

/* Main layout: general inputs on left, day inputs on right */
.main-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.general-inputs-column {
    flex: 0 0 256px;
    min-width: 220px;
}

.day-inputs-column {
    flex: 1;
    min-width: 0;
}

@media (max-width: 900px) {
    .main-layout {
        flex-direction: column;
    }

    .general-inputs-column {
        flex: none;
        width: 100%;
    }
}

/* Deprecated: kept for compatibility */
.input-section {
    display: block;
    max-width: 100%;
    margin: 0 auto 20px auto;
}

.input-column {
    display: flex;
    flex-direction: column;
}

.input-column .box {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Box styling */
.box {
    background: white;
    padding: 22px 32px;
    margin-bottom: 20px;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.info-box {
    color: #333;
    line-height: 1.6;
}

.info-box a {
    color: #8A2422;
}

/* File Upload Area */
.file-upload-container {
    margin-bottom: 15px;
}

.file-upload-area {
    border: 2px dashed #495057;
    border-radius: 5px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 10px;
}

.file-upload-area:hover {
    border-color: #8A2422;
    background: #fafafa;
}

.file-upload-area.file-loaded {
    background: #E5EADD;
    border-color: #28a745;
    border-style: solid;
}

.upload-icon-img {
    width: 24px;
    height: 24px;
}

.upload-text {
    display: flex;
    flex-direction: column;
}

.upload-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.upload-browse {
    font-size: 0.85rem;
    color: #6c757d;
}

.file-input-hidden {
    display: none;
}

.file-status {
    font-size: 0.85rem;
    color: #28a745;
    margin-top: 5px;
}

/* Generate New Success Message */
.generate-new-message {
    background: #d4edda;
    border: 1px solid #28a745;
    border-radius: 5px;
    padding: 12px 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #155724;
    font-size: 0.9rem;
}

.generate-new-message .success-icon {
    background: #28a745;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* Button Row */
.button-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-secondary {
    background: #f4f4f4;
    border: 1px solid #999;
    color: #333;
    padding: 8px 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-secondary:hover {
    background: #e5e5e5;
    border-color: #ccc;
}

.btn-highlight {
    background: #8A2422;
    border: 1px solid #8A2422;
    color: white;
    padding: 8px 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-highlight:hover {
    background: #7F211F;
    border-color: #7F211F;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-icon {
    font-size: 1rem;
}

/* Form Controls */
.form-group {
    margin-bottom: 15px;
}

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

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #8A2422;
}

select.form-control {
    background: white;
}

.btn-reset {
    width: 100%;
    padding: 10px;
    background: #f4f4f4;
    border: 1px solid #ddd;
    color: #333;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 10px;
}

.btn-reset:hover {
    background: #e8e8e8;
}

/* Day Inputs Section */
.day-inputs-box {
    padding: 30px 20px;
}

.day-inputs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 30px;
}

@media (max-width: 768px) {
    .day-inputs-grid {
        grid-template-columns: 1fr;
    }
}

.loading-days {
    grid-column: 1 / -1;
    text-align: center;
    color: #6c757d;
    padding: 20px;
}

/* Day Input Row - Two lines per day */
.day-input-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 10px;
    background: #fafafa;
    min-height: 85px;
}

.day-input-top {
    display: flex;
    align-items: center;
    gap: 11px;
}

.day-input-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 85px;
}

.date-label {
    min-width: 52px;
    font-size: 0.95rem;
    font-weight: 600;
}

.date-label.date-warn {
    color: #D32F2F;
    /* Removed background and border-radius as requested */
}

/* Radio Buttons */
.day-type-radios {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: nowrap;
}

.day-type-radios label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    margin-bottom: 0 !important;
    /* Override .form-group label */
    white-space: nowrap;
}

.day-type-radios input[type="radio"] {
    margin: 0;
    padding: 0;
    width: 13px !important;
    height: 13px !important;
    min-width: 13px;
    min-height: 13px;
    box-shadow: none !important;
    border: none !important;
    cursor: pointer;
    appearance: auto;
    /* Reset appearance just in case */
    display: inline-block;
}

/* Conditional Fields */
.conditional-fields {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.normal-field,
.overtime-field,
.absence-field {
    display: none;
}

.normal-field.visible,
.overtime-field.visible,
.absence-field.visible {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* .absence-options replaced by .day-type-radios */

.partial-hours-field {
    display: none;
}

.partial-hours-field.visible {
    display: flex;
    align-items: center;
    gap: 5px;
}

.reason-input {
    flex: 1;
    max-width: 90px;
}

.reason-input input,
.time-input {
    padding: 4px 8px;
    border: 1px solid #ccc;
    font-size: 0.85rem;
    width: 100%;
}

.time-input {
    width: 86px;
}

/* Submit Section */
.submit-section {
    text-align: center;
    margin: 30px 0;
}

.btn-primary {
    background: #8A2422;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-primary:hover {
    background: #7F211F;
}

.btn-primary:active {
    background: #6A1C1A;
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* Download Section */
.download-container {
    margin-top: 20px;
}

.download-box-highlight {
    border: 2px solid #28a745;
    background: #d4edda;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.download-box-highlight h4 {
    margin: 0 0 15px 0;
    color: #155724;
}

.btn-download {
    display: inline-block;
    background: #E5EADD;
    border: 1px solid #ccc;
    color: #333;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-download:hover {
    background: #D8E0CC;
    text-decoration: none;
}

.protected-view-note {
    font-size: 0.8rem;
    color: #666;
    margin-top: 12px;
    margin-bottom: 0;
    font-style: italic;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-close:hover {
    color: #333;
}

.modal-content h3 {
    margin-top: 0;
    color: #8A2422;
}

.spinner-content {
    text-align: center;
}

/* Language Switcher Enhancement */
.language-switcher {
    margin-left: auto;
    font-size: 0.85rem;
}

.language-switcher a {
    color: white;
    text-decoration: none;
    padding: 3px 8px;
}

.language-switcher a:hover {
    text-decoration: underline;
}

.language-switcher a.active {
    font-weight: 600;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 0.85rem;
}

footer a {
    color: #8A2422;
}