﻿/*
    Backend only CSS for the Maintenance Protocol Page
*/

/* ==============================
   General Layout & Structure
================================= */

.protocol-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Header with Back Button */
.protocol-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

/* ==============================
   Buttons & Actions
================================= */

button {
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.protocol-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}


/* Back Button */
.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #F44336;
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    transition: background 0.2s, transform 0.1s ease-in-out;
}

    .back-btn:hover {
        background: #D32F2F;
        transform: scale(1.05);
    }

.back-btn-tiny {
    display: flex;
    align-items: center;
    gap: 2px;
    background: #F44336;
    font-size: 14px;
    color: white !important;
    padding: 8px 14px;
    border-radius: 6px;
    min-height: 38px;
    transition: background 0.2s, transform 0.1s ease-in-out;
}

    .back-btn-tiny:hover {
        background: #D32F2F;
        transform: scale(1.05);
    }

.file-upload-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #4DB6EB;
    color: white;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 6px;
    transition: background 0.2s, transform 0.1s ease-in-out;
}

    .file-upload-btn:hover {
        background: #3295C7;
        transform: scale(1.00);
    }

/* General Action Buttons */
.add-protocol-btn,
.add-option-btn,
.add-suboption-btn,
.import-protocol-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #4DB6EB;
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    transition: background 0.2s, transform 0.1s ease-in-out;
}

    .edit-protocol-btn:hover,
    .delete-protocol-btn:hover,
    .add-protocol-btn:hover,
    .add-option-btn:hover,
    .add-suboption-btn:hover,
    .import-protocol-btn:hover {
        background: #3295C7;
        transform: scale(1.05);
    }

.edit-protocol-btn,
.delete-protocol-btn,
.delete-himi-number-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 4px;
    cursor: pointer;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f4f4;
    border: 1px solid #ccc;
    color: #d32f2f;
    filter: grayscale();
}

    .edit-protocol-btn:hover,
    .delete-protocol-btn:hover,
    .delete-himi-number-btn:hover {
        background: #ffe5e5;
    }

    .delete-protocol-btn:disabled {
        background: #f4f4f4 !important;
        border: 1px solid #ddd !important;
        color: #aaa !important;
        cursor: not-allowed;
        transform: none !important;
        opacity: 0.6;
    }

.export-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #4DB6EB;
    font-weight: bold;
    height: 44px;
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    transition: background 0.2s, transform 0.1s ease-in-out;
}

    .export-btn:hover {
        background: #3295C7;
    }

.add-himi-number-btn {
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #4DB6EB;
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    transition: background 0.2s, transform 0.1s ease-in-out;
}

    .add-himi-number-btn:hover {
        background: #3295C7;
        transform: scale(1.05);
    }
/* Small Buttons */
.delete-btn {
    background: #f4f4f4;
    border: 1px solid #ccc;
    color: #d32f2f;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s ease-in-out;
}

    .delete-btn:hover {
        background: #ffe5e5;
        transform: scale(1.05);
    }

    .delete-btn:disabled {
        background: #f4f4f4 !important;
        border: 1px solid #ddd !important;
        color: #aaa !important;
        cursor: not-allowed;
        transform: none !important;
        opacity: 0.6;
    }

.delete-btn,
.move-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    margin: 0;
}

.move-btn {
    background: #f4f4f4;
    border: 1px solid #ccc;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s ease-in-out;
}

    .move-btn:hover {
        background: #e0e0e0;
        transform: scale(1.05);
    }

    .move-btn:disabled {
        background: #f4f4f4 !important;
        border: 1px solid #ddd !important;
        color: #aaa !important;
        cursor: not-allowed;
        transform: none !important;
        opacity: 0.6;
    }

/* ==============================
   Protocol Overview Cards
================================= */
.protocol-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f4f4f4;
    border-radius: 8px;
    transition: 0.2s;
}

    .protocol-card:hover {
        background: #e0e0e0;
    }

.protocol-name {
    font-size: 18px;
    font-weight: bold;
}

/* ==============================
   Protocol Details
================================= */

.protocol-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Option Cards */
.option-card {
    background: #e8e8e8;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    transition: all 0.7s ease-in-out;
}

.option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.option-card:hover {
    background-color: #d9edf7;
}

/* Sub Options */
.sub-options {
    list-style: none;
    padding: 0;
}

.sub-option-item {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    margin-top: 5px;
    transition: all 0.2s ease-in-out;
}

    .sub-option-item:hover {
        background-color: #d9edf7;
    }

/* ==============================
   Toggle Switch
================================= */

.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 20px;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 14px;
        width: 14px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: 0.4s;
        border-radius: 50%;
    }

input:checked + .slider {
    background-color: #4DB6EB;
}

    input:checked + .slider:before {
        transform: translateX(14px);
    }

/* ==============================
   Miscellaneous
================================= */

.pointer {
    cursor: pointer;
}

.drag-handle {
    cursor: grab;
    font-size: 18px;
    margin-left: 10px;
}
