/* #region ポップアップオーバーレイ */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    animation: fadeInOverlay 0.3s ease;
}

.popup-overlay.active {
    display: block;
}

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

/* #endregion */

/* #region ポップアップコンテナ */
.popup-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: slideIn 0.3s ease;
}

.popup-container.popup-wide {
    max-width: 1500px;
}

.popup-container.dragging {
    cursor: move;
    user-select: none;
    animation: none;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, calc(-50% - 30px));
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* #endregion */

/* #region ポップアップヘッダー */
.popup-header {
    padding: 25px 30px 20px;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
    cursor: move;
    user-select: none;
}

.popup-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    padding-right: 40px;
}

.popup-close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #999;
    font-size: 28px;
    line-height: 1;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.popup-close-button:hover {
    background: #f5f5f5;
    color: #333;
}

/* #endregion */

/* #region ポップアップボディ */
.popup-body {
    padding: 30px;
}

.popup-message {
    font-size: 16px;
    color: #333;
    line-height: 1.8;
    margin-bottom: 0;
}

.popup-content {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

/* #endregion */

/* #region ポップアップフッター */
.popup-footer {
    padding: 20px 30px 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* #endregion */

/* #region ポップアップボタン */
.popup-button {
    padding: 12px 40px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    min-width: 140px;
}

.popup-button-primary {
    background: #DC0714;
    color: white;
    box-shadow: 0 4px 15px rgba(220, 7, 20, 0.3);
}

.popup-button-primary:hover {
    background: #b80512;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 7, 20, 0.4);
}

.popup-button-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(220, 7, 20, 0.3);
}

.popup-button-secondary {
    background: white;
    color: #333;
    border: 2px solid #333;
}

.popup-button-secondary:hover {
    background: #333;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.popup-button-secondary:active {
    transform: translateY(0);
}

.popup-button-cancel {
    background: white;
    color: #999;
    border: 2px solid #ddd;
}

.popup-button-cancel:hover {
    background: #f5f5f5;
    color: #666;
    border-color: #999;
}

.popup-button-danger {
    background: white;
    color: #DC0714;
    border: 2px solid #DC0714;
}

.popup-button-danger:hover {
    background: #DC0714;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 7, 20, 0.3);
}

.popup-button-danger:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(220, 7, 20, 0.2);
}

/* #endregion */

/* #region アラートタイプ別スタイル */
.popup-container.popup-success .popup-header {
    border-bottom-color: #4CAF50;
}

.popup-container.popup-success .popup-title {
    color: #4CAF50;
}

.popup-container.popup-error .popup-header {
    border-bottom-color: #DC0714;
}

.popup-container.popup-error .popup-title {
    color: #DC0714;
}

.popup-container.popup-warning .popup-header {
    border-bottom-color: #FF9800;
}

.popup-container.popup-warning .popup-title {
    color: #FF9800;
}

.popup-container.popup-info .popup-header {
    border-bottom-color: #2196F3;
}

.popup-container.popup-info .popup-title {
    color: #2196F3;
}

/* #endregion */

/* #region アイコン */
.popup-icon {
    font-size: 48px;
    margin-bottom: 20px;
    text-align: center;
}

.popup-icon.icon-success {
    color: #4CAF50;
}

.popup-icon.icon-error {
    color: #DC0714;
}

.popup-icon.icon-warning {
    color: #FF9800;
}

.popup-icon.icon-info {
    color: #2196F3;
}

/* #endregion */

/* #region レスポンシブデザイン */
@media (max-width: 768px) {
    .popup-container {
        width: 95%;
        max-width: none;
    }

    .popup-container.popup-wide {
        max-width: none;
    }

    .popup-header {
        padding: 20px 20px 15px;
    }

    .popup-body {
        padding: 20px;
    }

    .popup-footer {
        padding: 15px 20px 20px;
        flex-direction: column;
    }

    .popup-button {
        width: 100%;
        min-width: auto;
    }

    .popup-title {
        font-size: 18px;
    }

    .popup-message {
        font-size: 14px;
    }
}

/* #endregion */

/* #region カスタムコンテンツ用スタイル */
.popup-form {
    margin-top: 20px;
}

.popup-form .form-group {
    margin-bottom: 20px;
}

.popup-form .form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.popup-form .form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.popup-form .form-input:focus {
    border-color: #DC0714;
    box-shadow: 0 0 0 3px rgba(220, 7, 20, 0.1);
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* #endregion */


