/* programla.css - Tamamen Yenilendi */

.container-full-height {
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.container-full-height .pinoo-editor {
    width: 100%;
    height: 800px;
    border: none;
}

.form-section {
    margin-top: 20px;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.cycle-visuals-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

/* Yeni Döngü Görselleştirme Sistemi */
.cycle-visual {
    position: relative;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle at center, #fff 25%, #f8f9fa 25%, #f8f9fa 35%, #e9ecef 35%);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    margin: 0 auto;
    display: block;
    overflow: visible;
    border: 3px solid #dee2e6;
    clear: both;
}

/* 15 Dakikalık Segment */
.time-segment {
    position: absolute;
    width: 8px;
    height: 60px;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transform-origin: 50% 175px;
    transition: all 0.2s ease;
    border-radius: 4px;
    top: 35px;
    left: 50%;
    margin-left: -4px;
}

.time-segment:hover {
    background-color: #007bff;
    transform: scale(1.2);
    z-index: 5;
}

.time-segment.active {
    background-color: #28a745;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
}

.time-segment.light-active {
    background-color: #ffc107;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.7);
}

.time-segment.pump-active {
    background-color: #17a2b8;
    box-shadow: 0 0 10px rgba(23, 162, 184, 0.7);
}

/* Saat Etiketleri */
.hour-label {
    position: absolute;
    font-size: 14px;
    font-weight: bold;
    color: #495057;
    transform: translate(-50%, -50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

/* Merkez Bilgi Paneli */
.cycle-center-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px solid #dee2e6;
    z-index: 15;
}

.cycle-center-info h4 {
    margin: 0 0 5px 0;
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
}

.cycle-center-info .active-count {
    font-size: 18px;
    font-weight: bold;
    color: #28a745;
}

.cycle-center-info .total-time {
    font-size: 10px;
    color: #6c757d;
}

/* Döngü Durumu Göstergesi */
.cycle-display-box {
    border: 1px solid #ccc;
    padding: 15px;
    border-radius: 8px;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-style: italic;
    color: #666;
    background: #f8f9fa;
    margin: 10px 0;
    text-align: center;
}

/* Kayıtlı Döngüler */
.saved-cycles {
    margin-top: 30px;
}

.saved-cycles h3 {
    color: #005000;
    margin-bottom: 15px;
}

#cycle-list {
    list-style: none;
    padding: 0;
}

#cycle-list li {
    background-color: #fff;
    border: 1px solid #eee;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#cycle-list li button {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

#cycle-list li button:hover {
    background-color: #c82333;
    transform: translateY(-1px);
}

/* Modal Stilleri */
.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.6);
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: #fefefe;
    margin: 0.5% auto;
    padding: 15px;
    border: none;
    width: 98%;
    max-width: 900px;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    height: 95vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.modal-content h2 {
    color: #005000;
    margin-bottom: 15px;
    font-size: 20px;
    flex-shrink: 0;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    margin-right: -10px;
    max-height: calc(90vh - 150px);
    min-height: 500px;
}

.modal-actions {
    margin-top: auto;
    padding: 20px 0;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-shrink: 0;
    border-top: 1px solid #e9ecef;
    background: white;
}

.modal-actions button {
    padding: 12px 24px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Modal içinde döngü görselinin boyutu */
#light-cycle-visual-modal, #water-pump-cycle-visual-modal {
    width: 380px;
    height: 380px;
    margin: 0 auto 15px auto;
    position: relative;
    clear: both;
    flex-shrink: 0;
}

/* Kontrol Butonları */
.cycle-controls {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 15px 0;
    flex-wrap: wrap;
}

.cycle-controls button {
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 15px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s ease;
}

.cycle-controls button:hover {
    background: #007bff;
    color: white;
    transform: translateY(-1px);
}

/* Durum Göstergesi */
.cycle-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #e9ecef;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 12px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-dot.light {
    background-color: #ffc107;
}

.status-dot.pump {
    background-color: #17a2b8;
}

.status-dot.off {
    background-color: #6c757d;
}

/* Form Butonları */
.action-button {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.action-button.cancel {
    background: linear-gradient(135deg, #6c757d, #545b62);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.action-button.cancel:hover {
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

/* Çevre Koşulları Stilleri */
.environment-controls {
    display: flex;
    gap: 20px;
    justify-content: space-between;
}

.control-box {
    flex: 1;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.control-box h3 {
    color: #005000;
    margin: 0 0 15px 0;
    font-size: 16px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
}

.manual-controls,
.automation-controls {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .cycle-visual {
        width: 280px;
        height: 280px;
    }
    
    #light-cycle-visual-modal, #water-pump-cycle-visual-modal {
        width: 280px;
        height: 280px;
    }
    
    .modal-content {
        width: 98%;
        margin: 1% auto;
        padding: 15px;
    }
    
    .cycle-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .environment-controls {
        flex-direction: column;
        gap: 15px;
    }
}