/* CUSTOM COLOR DEFINITIONS */
.bg-custom-green {
    background-color: #4CAF50 !important;
    color: #fff;
}
.btn-custom-green {
    background-color: #4CAF50 !important;
    border-color: #4CAF50 !important;
    color: #fff !important;
    transition: all 0.3s ease;
}
.btn-custom-green:hover {
    background-color: #388E3C !important;
    border-color: #388E3C !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.text-custom-green {
    color: #4CAF50 !important;
}

/* INPUT FIELD */
.time-input-wrapper {
    position: relative;
}
.custom-time-input {
    padding-right: 10px;
    padding-left: 40px;
    text-align: right;
    cursor: pointer;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}
.custom-time-input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
}
.time-picker-button {
    background: none;
    border: none;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    z-index: 2;
    color: #6c757d;
    transition: color 0.3s ease;
}
.time-picker-button:hover {
    color: #4CAF50;
}

/* CLOCK FACE */
#clock-face {
    width: 260px;
    height: 260px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 50%;
    position: relative;
    margin: 0 auto;
    border: 3px solid #dee2e6;
    box-shadow:
            inset 0 0 20px rgba(0, 0, 0, 0.1),
            0 4px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    overflow: hidden;
}

/* SELECTION HAND - عقربه نشانگر */
.selection-hand {
    position: absolute;
    width: 4px;
    height: 95px;
    background: linear-gradient(to top, #4CAF50, #388E3C);
    top: calc(50% - 95px);
    left: calc(50% - 2px);
    transform-origin: bottom center;
    z-index: 5;
    border-radius: 4px;
    pointer-events: none;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}

.selection-hand::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: #4CAF50;
    border-radius: 50%;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* CLOCK NUMBERS */
.clock-number {
    position: absolute;
    width: 34px;
    height: 34px;
    line-height: 34px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #e9ecef;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.clock-number.outer {
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid #dee2e6;
}

.clock-number.inner {
    width: 28px;
    height: 28px;
    line-height: 28px;
    font-size: 11px;
    background: rgba(248, 249, 250, 0.95);
    border: 1px solid #ced4da;
    font-weight: 500;
}

.clock-number.active {
    background: #4CAF50 !important;
    color: #fff !important;
    border-color: #388E3C !important;
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.5);
    z-index: 15;
}

.clock-number:hover:not(.active) {
    background: #E8F5E9 !important;
    color: #388E3C !important;
    border-color: #4CAF50 !important;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.3);
}

/* HEADER با چیدمان صحیح (ساعت چپ، دقیقه راست) */
.time-picker-header {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    padding: 1rem !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    direction: ltr; /* برای نمایش صحیح ساعت و دقیقه */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

#selected-hour, #selected-minute {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 0.25rem;
    display: inline-block;
    min-width: 60px;
    text-align: center;
    position: relative;
}

#selected-hour:hover, #selected-minute:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

#selected-hour.active, #selected-minute.active {
    background: rgba(255, 255, 255, 0.4);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

#selected-hour.active::after, #selected-minute.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
}

/* RESPONSIVE */
@media (max-width: 576px) {
    #clock-face {
        width: 220px;
        height: 220px;
    }

    .clock-number {
        width: 28px;
        height: 28px;
        line-height: 28px;
        font-size: 12px;
    }

    .clock-number.inner {
        width: 22px;
        height: 22px;
        line-height: 22px;
        font-size: 9px;
    }

    .time-picker-header {
        font-size: 2rem;
    }

    .selection-hand {
        height: 80px;
        top: calc(50% - 80px);
    }
}