/**
 * フロントエンドスタイル
 *
 * @package Nishi2_Push_Notification
 */

/* 通知許可ダイアログ */
.n2pn-notification-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    animation: n2pn-fade-in 0.3s ease-out;
}

.n2pn-notification-dialog.active {
    display: flex;
}

.n2pn-dialog-content {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: n2pn-slide-up 0.3s ease-out;
}

.n2pn-dialog-header {
    text-align: center;
    margin-bottom: 24px;
}

.n2pn-dialog-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
}

.n2pn-dialog-icon svg {
    width: 100%;
    height: 100%;
}

.n2pn-dialog-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #1a1a1a;
}

.n2pn-dialog-description {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.n2pn-dialog-body {
    margin: 24px 0;
}

.n2pn-topic-section {
    margin-bottom: 24px;
}

.n2pn-topic-section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #333;
}

.n2pn-topic-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}

.n2pn-topic-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #f5f5f5;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.n2pn-topic-item:hover {
    background: #e8e8e8;
}

.n2pn-topic-item input[type="checkbox"] {
    margin: 0 8px 0 0;
}

.n2pn-topic-item label {
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.n2pn-default-notice {
    background: #e8f4fd;
    border-left: 4px solid #2196F3;
    padding: 12px 16px;
    border-radius: 4px;
    margin: 16px 0;
}

.n2pn-default-notice p {
    margin: 0;
    font-size: 14px;
    color: #0d47a1;
}

.n2pn-dialog-footer {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.n2pn-button {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.n2pn-button-primary {
    background: #2196F3;
    color: #fff;
}

.n2pn-button-primary:hover {
    background: #1976D2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.n2pn-button-secondary {
    background: #f5f5f5;
    color: #666;
}

.n2pn-button-secondary:hover {
    background: #e0e0e0;
}

.n2pn-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.n2pn-settings-link {
    text-align: center;
    margin-top: 16px;
}

.n2pn-settings-link a {
    color: #2196F3;
    text-decoration: none;
    font-size: 14px;
}

.n2pn-settings-link a:hover {
    text-decoration: underline;
}

/* 通知アイコンボタン */
.n2pn-notification-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #2196F3;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999998;
    transition: all 0.2s;
}

.n2pn-notification-button:hover {
    background: #1976D2;
    transform: scale(1.1);
}

.n2pn-notification-button svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

/* アニメーション */
@keyframes n2pn-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes n2pn-slide-up {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* レスポンシブ */
@media (max-width: 640px) {
    .n2pn-dialog-content {
        padding: 24px;
        width: 95%;
    }

    .n2pn-topic-list {
        grid-template-columns: 1fr;
    }

    .n2pn-dialog-footer {
        flex-direction: column;
    }

    .n2pn-notification-button {
        bottom: 16px;
        right: 16px;
    }
}
