/* ????? ????????? ???? ???????? (???????????? ?? ??????? ????????) */

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 300px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal h2 {
    margin-top: 0;
    color: #333;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.field-hint {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.35;
    color: #666;
    font-weight: normal;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input:not([type="radio"]):not([type="checkbox"]) {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.contact-channel-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 4px;
    align-items: center;
}

.contact-channel-option {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    margin-bottom: 0 !important;
    font-weight: normal !important;
    line-height: 1.25;
    cursor: pointer;
}

.contact-channel-option input[type="radio"] {
    width: 14px;
    height: 14px;
    margin: 0;
    padding: 0;
    border: none;
    flex-shrink: 0;
    vertical-align: middle;
    box-sizing: border-box;
}

.email-display {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #f5f5f5;
    color: #333;
    font-weight: 600;
    word-break: break-all;
}

.buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.password-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

.work-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    margin: 5px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .work-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    .work-btn.active {
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
        background-color: #2980b9;
    }

    .work-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

/* ?????? ???????? ?????????? ????, ?????????? ????? ?????? */
.modal-overlay {
    position: fixed; /* ????????? ???????????? ???? ???????? */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* ?????????? ???? */
    z-index: 1000; /* ????, ??? ???? ????????? ??????? */
    display: flex; /* ????? ???????????? ??? ????????????? ?????? ???? */
    justify-content: center;
    align-items: center;
}

/* ????????? ????, ??????????????? ?????? overlay */
.modal-window {
    background: white;
    padding: 20px;
    border-radius: 8px;
    /* z-index ?? ??????????, ???? ?? ?????? overlay, ??? ??? ???????? ????????? ???????????? ????????? */
    max-width: 500px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* ???????? ???? ?? ???????? ??? ??????/?????? ????? */
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .modal-header h2 {
        font-size: 24px;
        font-weight: 600;
    }

.modal-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-footer {
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    border-top: 1px solid #dee2e6;
}

/* Tree container */
.tree-container {
    flex: 1;
    overflow: auto;
    padding: 20px;
    background: #f8f9fa;
}

.tree-node {
    margin-left: 20px;
    user-select: none;
}

.tree-item {
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

    .tree-item:hover {
        background: #e9ecef;
    }

    .tree-item.selected {
        background: #e3f2fd;
        border-left: 4px solid #2196f3;
    }

.tree-icon {
    margin-right: 10px;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.folder-icon {
    color: #ffb300;
}

.file-icon {
    color: #757575;
}

.toggle-icon {
    margin-right: 8px;
    cursor: pointer;
    width: 20px;
    text-align: center;
    font-size: 12px;
    color: #6c757d;
}

.tree-item span {
    font-size: 15px;
    color: #343a40;
}

.tree-children {
    display: none;
    margin-left: 24px;
}

    .tree-children.expanded {
        display: block;
    }

/* File info */
.file-info {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    font-size: 14px;
    color: #6c757d;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.details-panel {
    flex: 1;
    background-color: white;
    overflow-y: auto;
    padding: 20px;
}
