/**
 * Frontend CSS for Employee Attendance Clock
 */

/* Main Container */
.eac-attendance-clock {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Header */
.eac-clock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.eac-site-logo img {
    max-height: 60px;
    max-width: 200px;
}

.eac-site-title {
    font-size: 24px;
    margin: 0;
}

.eac-datetime {
    text-align: right;
}

.eac-date {
    font-size: 16px;
    margin-bottom: 5px;
}

.eac-time {
    font-size: 24px;
    font-weight: bold;
}

/* Content */
.eac-clock-content {
    margin-bottom: 30px;
}

.eac-employee-info {
    margin-bottom: 20px;
    text-align: center;
}

.eac-status {
    font-weight: bold;
    margin-top: 5px;
}

.eac-clock-actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 15px !important;
    margin: 30px 0 !important;
}

/* Radio Group */
.eac-radio-group {
    display: flex;
    flex-direction: row;
    margin-top: 20px;
    justify-content: space-around;
}

/* Button Styles */
.eac-btn, .eac-btn2 {
    display: inline-block !important;
    font-weight: bold !important;
    text-align: center !important;
    border: none !important;
    cursor: pointer !important;
    transition: background-color 0.3s !important;
}

/* Main Clock Button - Round and Big */
.eac-clock-actions #eac-clock-button {
    padding: 40px !important;
    font-size: 18px !important;
    border-radius: 50% !important; /* Make it a circle */
    width: 130px !important;
    height: 130px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Custom Record Button - Rectangular and Smaller */
.eac-btn2 {
    padding: 12px 25px !important;
    font-size: 14px !important;
    border-radius: 25px !important;
    background-color: #4e93d1 !important;
    color: white !important;
}

.eac-btn2:hover {
    background-color: #5eaef6 !important;
}

/* Keep existing button colors */
.eac-btn-green {
    background-color: #4CAF50 !important;
    color: white !important;
}

.eac-btn-green:hover {
    background-color: #45a049 !important;
}

.eac-btn-red {
    background-color: #f44336 !important;
    color: white !important;
}

.eac-btn-red:hover {
    background-color: #d32f2f !important;
}

/* Responsive adjustments */
@media screen and (max-width: 600px) {
    .eac-clock-actions #eac-clock-button {
        padding: 30px !important;
        width: 110px !important;
        height: 110px !important;
        font-size: 16px !important;
    }
    
    .eac-btn2 {
        padding: 10px 20px !important;
        font-size: 13px !important;
    }
}
/* Message */
.eac-message {
    margin: 20px 0;
    padding: 10px 15px;
    border-radius: 4px;
}

.eac-success {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.eac-error {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

/* Active Employees */
.eac-active-employees {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.eac-active-employees h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
}

.eac-employees-list {
    min-height: 50px;
}

.eac-employees-list ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.eac-employees-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.eac-employees-list li:last-child {
    border-bottom: none;
}

.eac-loading {
    color: #888;
    font-style: italic;
}

/* Login Form */
.eac-login-container {
    max-width: 400px;
    margin: 40px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.eac-login-container h2 {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

#eac-login-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#eac-login-form .input {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#eac-login-form .button-primary {
    width: 100%;
    padding: 10px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#eac-login-form .button-primary:hover {
    background-color: #005177;
}

#eac-login-form .login-remember {
    margin-bottom: 15px;
}

#eac-login-form .login-remember label {
    display: inline;
}

/* Custom Record Modal Styles */
.eac-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.eac-modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.eac-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #aaa;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.eac-modal-close:hover {
    color: #333;
}

.eac-form-row {
    margin-bottom: 15px;
}

.eac-form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.eac-form-row input[type="text"],
.eac-form-row textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.eac-form-actions {
    margin-top: 20px;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .eac-clock-header {
        flex-direction: column;
        text-align: center;
    }
    
    .eac-datetime {
        text-align: center;
        margin-top: 15px;
    }
    
    .eac-site-logo img {
        max-height: 50px;
    }
    
    .eac-clock-actions {
        flex-direction: column;
    }
    
    .eac-modal-content {
        margin: 20% auto;
        width: 95%;
    }
    
    .eac-form-row input[type="text"] {
        font-size: 16px !important; /* Prevents iOS zoom */
        height: 44px !important; /* Better tap target */
    }
}

/* RTL Support for Hebrew */
.rtl .eac-clock-header {
    flex-direction: row-reverse;
}

.rtl .eac-datetime {
    text-align: left;
}

.rtl .eac-employees-list ul {
    text-align: right;
}

.rtl #eac-login-form .login-remember label {
    margin-right: 5px;
}

.rtl .eac-form-actions {
    justify-content: flex-start;
}

.rtl .eac-modal-close {
    right: auto;
    left: 15px;
}

/* Hebrew Specific */
html[lang="he-IL"] .eac-btn {
    font-family: "Arial Hebrew", Arial, sans-serif;
}

/**
 * Add these styles to your frontend.css file
 */

/* Make date input look non-editable but still clickable */
#eac-custom-record-date {
    background-color: #f8f8f8 !important;
    cursor: pointer !important;
}

/* Add some spacing for the datepicker to ensure it's not hidden on mobile */
.ui-datepicker {
    margin-top: 10px !important;
    font-size: 16px !important; /* Larger text for mobile */
}

/* Make datepicker touch-friendly */
.ui-datepicker td span, 
.ui-datepicker td a {
    padding: 8px !important;
}

/* Increase the tap target size for the datepicker navigation */
.ui-datepicker .ui-datepicker-prev, 
.ui-datepicker .ui-datepicker-next {
    width: 30px !important;
    height: 30px !important;
}

/* Additional mobile optimizations */
@media screen and (max-width: 600px) {
    .ui-datepicker {
        width: 280px !important;
    }
    
    .eac-modal-content {
        width: 95% !important;
        padding: 15px !important;
    }
    
    .eac-form-row input[type="text"] {
        font-size: 16px !important; /* Prevents iOS zoom */
        height: 44px !important; /* Better tap target */
    }
}

button#eac-save-custom-record {
margin-right: 25px;
}

/* Specific style for the 'Report Absence' button */
#eac-absence-button {
    background-color: #fa7f7f !important;
}

#eac-absence-button:hover {
    background-color: #e06666 !important;
}