/* Componentes compartidos: logo personalizado (my-plan, settings) */

.settings-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.settings-modal-overlay.visible {
    display: flex;
    animation: customLogoFadeIn 0.2s ease-out;
}

@keyframes customLogoFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.settings-modal {
    background: var(--white);
    border-radius: 24px;
    padding: 32px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: customLogoSlideUp 0.25s ease-out;
}

@keyframes customLogoSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.settings-modal h3 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--red);
    margin: 0 0 8px;
}

.settings-modal-info h3 {
    color: var(--gray-dark);
}

.settings-modal p {
    font-size: var(--text-sm);
    color: var(--gray);
    margin-bottom: 20px;
    line-height: 1.5;
}

.settings-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.settings-btn-pink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pink), #db2777);
    color: #fff;
    font-size: var(--text-sm);
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 0 #be185d, 0 8px 16px rgba(219, 39, 119, 0.18);
}

.settings-btn-pink:hover {
    text-decoration: none;
    color: #fff;
    transform: translateY(-1px);
}

.settings-btn-muted {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(to bottom, #e5e7eb, #d1d5db);
    color: var(--gray-dark);
    font-size: var(--text-sm);
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 0 #9ca3af, 0 6px 10px rgba(0, 0, 0, 0.08);
}

.brand-logo-modal {
    max-width: 520px;
    text-align: left;
    padding: 24px;
}

.brand-logo-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.brand-logo-modal-header h3 {
    color: var(--gray-dark);
    margin-bottom: 4px;
}

.brand-logo-modal-subtitle {
    margin: 0;
    font-size: 0.85rem;
    color: var(--gray);
    line-height: 1.5;
}

.settings-logo-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--gray-light);
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    margin-bottom: 16px;
}

.settings-logo-preview img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: contain;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.settings-logo-preview-info {
    flex: 1;
    min-width: 0;
}

.settings-logo-delete {
    padding: 6px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--red);
    border-radius: 8px;
    transition: background 0.2s;
}

.settings-logo-delete:hover {
    background: #fef2f2;
}

.settings-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.settings-upload-area:hover {
    border-color: var(--blue);
    background: rgba(26, 188, 245, 0.04);
}

.settings-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    z-index: 1100;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: var(--text-sm);
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.settings-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.settings-toast.success {
    background: #166534;
    color: #fff;
}

.settings-toast.error {
    background: #991b1b;
    color: #fff;
}

.logo-crop-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1010;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
}

.logo-crop-overlay.visible {
    display: flex;
}

.logo-crop-modal {
    background: var(--white);
    border-radius: 20px;
    width: 92%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.logo-crop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}

.logo-crop-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-dark);
    margin: 0;
}

.logo-crop-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f3f4f6;
    font-size: 1.4rem;
    color: var(--gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}

.logo-crop-close:hover {
    background: #e5e7eb;
}

.logo-crop-subtitle {
    padding: 6px 24px 0;
    margin: 0;
    font-size: 0.85rem;
    color: var(--gray);
    line-height: 1.5;
}

.logo-crop-body {
    padding: 16px 24px 0;
}

.logo-crop-container {
    width: 100%;
    max-height: 420px;
    background: #111827;
    border-radius: 12px;
    overflow: hidden;
}

.logo-crop-container img {
    display: block;
    max-width: 100%;
}

.logo-crop-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 24px 24px;
}

.logo-crop-btn-cancel,
.logo-crop-btn-confirm {
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: var(--text-sm);
    font-weight: 800;
    cursor: pointer;
    border: none;
}

.logo-crop-btn-cancel {
    background: #e5e7eb;
    color: var(--gray-dark);
}

.logo-crop-btn-confirm {
    background: linear-gradient(135deg, var(--blue), #0ea5e9);
    color: #fff;
    box-shadow: 0 4px 0 #0b8fc4, 0 8px 16px rgba(26, 188, 245, 0.18);
}

@media (max-width: 560px) {
    .settings-modal,
    .brand-logo-modal {
        padding: 20px 16px;
    }

    .settings-modal-actions,
    .logo-crop-actions {
        flex-direction: column;
    }

    .settings-btn-pink,
    .settings-btn-muted,
    .logo-crop-btn-cancel,
    .logo-crop-btn-confirm {
        width: 100%;
    }
}
