/* Template Settings Modal Styles */

.template-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.template-settings-modal.open {
    opacity: 1;
    visibility: visible;
}

.template-settings-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 90%;
    overflow: hidden;
}

.template-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.template-settings-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.template-settings-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.2s ease;
}

.template-settings-close:hover {
    color: #111827;
}

.template-settings-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.template-settings-actions {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    justify-content: flex-end;
}

.template-settings-actions button {
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.template-settings-actions button:hover {
    transform: translateY(-1px);
}

/* Page Margins Radio Styles */
input[name="page_margins_modal"] {
    appearance: none;
    -webkit-appearance: none;
    width: 0;
    height: 0;
    visibility: hidden;
}

input[name="page_margins_modal"]:checked + * {
    border-color: #9333ea;
    background: #f3e8ff;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

input[name="page_margins_modal"]:checked + .flex::before {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    background: #9333ea;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

label[class*="flex"] {
    position: relative;
}
