/* Shared editor modal + button styling (extracted from main.css) */

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #4f46e5;
    color: white;
}

.btn-primary:hover {
    background: #4338ca;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-preview {
    background: #fff;
    color: #374151;
    border: 2px solid #e5e7eb;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    font-size: 14px;
    min-width: 100px;
}

.btn-preview:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-preview i {
    color: #4f46e5;
    font-size: 14px;
    width: 14px;
    text-align: center;
}

.btn-preview span {
    display: inline-block;
    min-width: 80px;
}

/* Modern Modal Styles */
.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: 9999;
    backdrop-filter: blur(2px);
    font-family: var(--editor-font-family, 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 90vh;
    overflow: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(to bottom, #ffffff, #f9fafb);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-header h3::before {
    content: '';
    width: 4px;
    height: 24px;
    background: #4f46e5;
    border-radius: 2px;
}

.modal-close {
    background: #f3f4f6;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 0.5rem;
}

.modal-close:hover {
    background: #e5e7eb;
    color: #1f2937;
    transform: scale(1.05);
}

.modal-body {
    padding: 2rem;
    background: white;
}

/* Reusable modal card */
.modal-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
    width: 100%;
    max-width: 640px;
    overflow: hidden;
}

.modal-card .modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.modal-card .modal-header h3::before {
    display: none;
}

.modal-title-stack {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-logo {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.modal-logo .footer-logo-icon:hover {
    transform: scale(1.05) rotate(3deg);
}

.modal-logo .footer-logo-icon:hover .footer-logo-shine {
    transform: translateY(0);
}

.modal-logo .footer-logo-icon {
    width: 36px;
    height: 36px;
}

.modal-logo .footer-logo-mark {
    width: 21.6px;
    height: 21.6px;
}

/* Wobbio logo styles (shared by modals + editor chrome) */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: default;
    user-select: none;
}

.footer-logo-link {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.footer-logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 9.6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
    transition: transform 0.25s ease;
}

.footer-logo-shine {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(100%);
    transition: transform 0.25s ease;
}

.footer-logo-mark {
    width: 19.2px;
    height: 19.2px;
    position: relative;
    z-index: 1;
}

.footer-logo-text {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
    color: #0f172a;
    position: relative;
    display: inline-flex;
    align-items: center;
}

.footer-logo-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    transform: translateX(50%);
    background: #e2e8f0;
    color: #64748b;
    padding: 2px 5px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.4px;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.footer-logo:hover .footer-logo-icon {
    transform: scale(1.05) rotate(3deg);
}

.footer-logo:hover .footer-logo-shine {
    transform: translateY(0);
}

.modal-eyebrow {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    color: #6366f1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.modal-card .modal-header h3 {
    margin: 2px 0 0 0;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.modal-card .modal-body {
    padding: 20px 24px;
    color: #4b5563;
    line-height: 1.6;
}

.modal-actions {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #ffffff;
}

.modal-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.modal-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.modal-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-label {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
}

.modal-helper-text {
    margin: 0 0 12px 0;
    font-size: inherit;
    color: inherit;
    line-height: inherit;
}
