/* ================= Pop-up Windows ================= */

.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: none;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.popup-overlay.show {
    display: flex;
    opacity: 1;
}

.popup-window {
    display: none;
    background: rgba(255,255,255,0.95);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-window.show {
    display: flex;
    opacity: 1;
    align-self: center;
    margin: auto;
}

.popup-standard {
    width: 90%;
    max-width: 520px;
    flex-direction: column;
    height: auto;
    max-height: 70vh;
    min-height: 70vh;
    min-width: 360px;
    overflow: hidden;
    padding: 24px;
    padding-bottom: 20px;
}

.popup-standard .popup-title {
    margin-bottom: 16px;
    flex-shrink: 0;
    margin-top: 0;
    padding: 0;
}

.popup-standard .popup-content-flex {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.popup-info {
    overflow: hidden;
    display: none;
    flex-direction: column;
}

.popup-info.show {
    display: flex;
}

.popup-window::-webkit-scrollbar {
    width: 6px;
}
.popup-window::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 4px;
}
.popup-window::-webkit-scrollbar-track {
    background: transparent;
}

.popup-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.popup-icon {
    width: 64px;
    height: 64px;
    color: #1976d2;
}

.popup-title {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 16px;
    color: #333;
}

.popup-content {
    color: #555;
    line-height: 1.6;
    font-size: 14px;
}

.popup-textarea {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: monospace;
    font-size: 13px;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
}

.popup-textarea-flex {
    flex: 1;
    min-height: 120px;
    resize: none;
}

.popup-textarea:focus {
    border-color: #1976d2;
}

.popup-textarea.drag-over {
    border-color: #1976d2;
    background-color: rgba(25, 118, 210, 0.05);
}

.popup-button {
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.popup-button:hover {
    background: #1565c0;
}

.popup-button:active {
    background: #0d47a1;
}

.popup-button-group {
    display: flex;
    gap: 12px;
}

.popup-button-group .popup-button {
    flex: 1;
    margin-top: 0;
}
/* ================= Info Popup Tabs ================= */

.info-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 16px;
    margin-left: -24px;
    margin-right: -24px;
    margin-top: -8px;
    padding: 0 24px;
}

.info-tab-btn {
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.info-tab-btn:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.02);
}

.info-tab-btn.active {
    color: #1976d2;
    border-bottom-color: #1976d2;
}

.info-tab-content h4 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 16px;
}

.popup-info .info-tab-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 6px;
}

.info-tab-content ul {
    list-style: none;
}

.info-tab-content li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.info-tab-content a {
    color: #1976d2;
    text-decoration: none;
}

.info-tab-content a:hover {
    text-decoration: underline;
}

.info-startup-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 14px;
    color: #555;
}

.filename-inputs {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin-bottom: 12px;
    align-items: flex-end;
}

.filename-inputs .input-group {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.filename-inputs .input-group:first-child {
    flex: 1 1 auto;
    min-width: 0;
}

.filename-inputs .input-group:nth-child(2) {
    flex: 0 0 100px;
}

.filename-inputs input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: monospace;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
    width: 100%;
}

.filename-inputs input:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.filename-inputs .popup-button {
    padding: 10px 12px;
    margin-top: 0;
    white-space: nowrap;
    flex: 0 0 130px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

.input-group input {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: monospace;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
}

.input-group input:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 4px #f44;
    }
    50% {
        opacity: 0.6;
        box-shadow: 0 0 8px #f44;
    }
}

/* ================= Export Panel Options ================= */
.export-options {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 8px 0;
    flex: 1;
}

.export-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: #555;
    flex: 0 0 auto;
    white-space: nowrap;
}

.export-options input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.export-actions {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
}

.copied-label {
    display: flex;
    opacity: 0;
    align-items: center;
    color: #4caf50;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    flex: 0 0 auto;
    opacity: 0;
    transition: opacity cubic-bezier(0, 0.52, 1, 1) 0.7s;
}

.copied-label.visible {
    opacity: 1;
}

#refreshButton {
    width: 42px;
    height: 42px;
    padding: 9px;
}

#copyButton {
    width: 42px;
    height: 42px;
    padding: 9px;
}
