/* Notification Toggle in Modals */
.notify-toggle-row {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.notify-toggle-row.visible {
    display: flex;
}

.notify-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    font-size: 13px;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.notify-toggle-label svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}


/* iOS-style Toggle Switch */
.toggle-switch {
    position: relative;
    width: 46px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    border-radius: 28px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background: var(--text-tertiary);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--gold) 0%, #D4B978 100%);
    border-color: var(--gold);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(18px);
    background: white;
    box-shadow: 0 2px 8px rgba(201, 169, 98, 0.4);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px var(--gold-dim);
}

/* Unified Notifications Modal */
.notifications-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-out;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.notifications-modal.active {
    opacity: 1;
    visibility: visible;
}

.notifications-modal-content {
    background: linear-gradient(180deg, #1a1a1d 0%, #141416 100%);
    border: 1px solid var(--border-accent);
    border-bottom: none;
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 400px;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.notifications-modal.active .notifications-modal-content {
    transform: translateY(0);
}

.notifications-modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, #1a1a1d 0%, #1a1a1d 100%);
    z-index: 1;
}

.notifications-modal-header::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    background: var(--text-tertiary);
    border-radius: 2px;
    opacity: 0.5;
}

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

.notifications-modal-title-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gold-dim) 0%, rgba(201, 169, 98, 0.15) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.notifications-modal-title-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--gold);
    stroke-width: 2;
    fill: none;
}

.notifications-modal-title h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 500;
    color: var(--champagne);
    margin: 0;
}

.notifications-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.notifications-modal-close:hover {
    background: var(--bg-card-elevated);
    border-color: var(--text-tertiary);
}

.notifications-modal-close svg {
    width: 14px;
    height: 14px;
    stroke: var(--text-secondary);
    stroke-width: 2;
}

.notifications-modal-body {
    padding: 20px 24px 32px;
}

.notify-section {
    margin-bottom: 24px;
}

.notify-section:last-child {
    margin-bottom: 0;
}

.notify-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.notify-section-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notify-section-icon.profit {
    background: rgba(52, 211, 153, 0.15);
}

.notify-section-icon.profit svg {
    stroke: var(--positive);
}

.notify-section-icon.goal {
    background: rgba(201, 169, 98, 0.15);
}

.notify-section-icon.goal svg {
    stroke: var(--gold);
}

.notify-section-icon.milestone {
    background: rgba(147, 197, 253, 0.15);
}

.notify-section-icon.milestone svg {
    stroke: #93c5fd;
}

.notify-section-icon.api-recovery {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.2), rgba(52, 211, 153, 0.1));
}

.notify-section-icon.api-recovery svg {
    stroke: #34D399;
}

.notify-section-icon svg {
    width: 14px;
    height: 14px;
    stroke-width: 2;
    fill: none;
}

.notify-section-title {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--champagne);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.notify-section-content {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    overflow: hidden;
}

.notify-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.notify-row:last-child {
    border-bottom: none;
}

.notify-row-label {
    font-size: 14px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.notify-row-label svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-tertiary);
    stroke-width: 1.5;
    fill: none;
}

.notify-row-sublabel {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.notify-input-small {
    width: 80px;
    padding: 8px 10px;
    font-family: var(--font-body);
    font-size: 14px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: var(--bg-deep);
    color: var(--text-primary);
    text-align: right;
}

.notify-input-small:focus {
    outline: none;
    border-color: var(--gold);
}

.notify-section-hint {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 10px;
    padding: 0 4px;
    line-height: 1.5;
}

.notify-unsubscribe-section {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}

.notify-unsubscribe-btn {
    width: 100%;
    padding: 14px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--negative);
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.25);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.notify-unsubscribe-btn:hover {
    background: rgba(248, 113, 113, 0.15);
    border-color: rgba(248, 113, 113, 0.4);
}

.notify-unsubscribe-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}
