/**
 * modal_dialog_jq.css
 * jQuery UI Dialog 用のカスタムスタイル
 *
 * $Id$
 */

/* ============================================================
   モーダルダイアログ共通スタイル
   ============================================================ */

/* モーダルコンテナ */
.eco-modal-container {
    padding: 0;
    overflow: hidden;
}

/* モーダルダイアログラッパー */
.eco-modal-dialog {
    padding: 0;
}

.eco-modal-dialog .ui-dialog-content {
    padding: 0;
    overflow: hidden;
}

.eco-modal-dialog .ui-dialog-titlebar {
    background: #4a7298;
    border: none;
    border-radius: 4px 4px 0 0;
    padding: 8px 10px;
}

.eco-modal-dialog .ui-dialog-title {
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.eco-modal-dialog .ui-dialog-titlebar-close {
    background: transparent;
    border: none;
    color: #fff;
    opacity: 0.8;
}

.eco-modal-dialog .ui-dialog-titlebar-close:hover {
    opacity: 1;
}

.eco-modal-dialog .ui-dialog-titlebar-close .ui-icon {
    background-image: none;
}

.eco-modal-dialog .ui-dialog-titlebar-close::before {
    content: "\00d7";
    font-size: 20px;
    color: #fff;
}

/* iframe */
.eco-modal-iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================================================
   ローディングスピナー
   ============================================================ */

.eco-modal-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff url('../img/eos/loading.gif') center center no-repeat;
    z-index: 100;
    display: none;
}

/* CSSアニメーション版ローディング（GIF画像がない場合用） */
.eco-modal-loading::after {
    content: "";
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4a7298;
    border-radius: 50%;
    animation: eco-spin 1s linear infinite;
}

@keyframes eco-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================================
   アラート・確認ダイアログ (alphacube テーマ準拠の色合い)
   ============================================================ */

/* ダイアログ外枠: 旧 alphacube_window 風の枠 */
.eco-alert-dialog-wrapper,
.eco-confirm-dialog-wrapper {
    padding: 0;
    background: #FDFDFD;
    border: 1px solid #999;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* タイトルバー (jQuery UI 標準) は非表示。subtitle2_g がタイトル代わり */
.eco-alert-dialog-wrapper .ui-dialog-titlebar,
.eco-confirm-dialog-wrapper .ui-dialog-titlebar {
    display: none;
}

/* コンテンツ領域: 旧 alphacube_content 風の白背景 */
.eco-alert-dialog-wrapper .ui-dialog-content,
.eco-confirm-dialog-wrapper .ui-dialog-content {
    padding: 0;
    background: #FDFDFD;
    overflow: hidden;
}

/* タイトル: 本来の subtitle2_g (緑系) を尊重しつつ、ダイアログ用にサイズ・余白だけ調整 */
.eco-alert-dialog h2.subtitle2_g,
.eco-confirm-dialog h2.subtitle2_g {
    /* color / background-image / font-weight は css_eos/common.css の本来定義が効く */
    font-size: 18px;
    padding: 10px 15px 6px;
    margin: 0 0 10px 0;
}

.eco-alert-dialog .align_c,
.eco-confirm-dialog .align_c {
    text-align: center;
    margin: 15px 0;
    padding-bottom: 10px;
}

.eco-alert-dialog .align_c input[type="image"],
.eco-confirm-dialog .align_c input[type="image"] {
    margin: 0 5px;
    cursor: pointer;
}

.eco-alert-dialog .mgn_b15,
.eco-confirm-dialog .mgn_b15 {
    margin-bottom: 15px;
}

.eco-alert-dialog .pad_a10,
.eco-confirm-dialog .pad_a10 {
    padding: 10px 20px;
}

/* ============================================================
   プログレスダイアログ
   ============================================================ */

.eco-progress-dialog-wrapper {
    border: none;
    background: transparent;
    box-shadow: none;
}

.eco-progress-dialog-wrapper .ui-dialog-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 20px;
    text-align: center;
}

.eco-progress-dialog {
    text-align: center;
}

.eco-progress-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #4a7298;
    border-radius: 50%;
    animation: eco-spin 1s linear infinite;
}

.eco-progress-message {
    font-size: 14px;
    color: #333;
}

/* ============================================================
   jQuery UI オーバーレイ
   ============================================================ */

.ui-widget-overlay {
    background: #000;
    opacity: 0.5;
    filter: alpha(opacity=50);
}

/* ============================================================
   jQuery UI Dialog ボタン調整
   ============================================================ */

.ui-dialog .ui-dialog-buttonpane {
    border-top: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
    float: none;
}

.ui-dialog .ui-dialog-buttonpane button {
    margin: 0 5px;
    padding: 8px 20px;
    cursor: pointer;
}

/* ============================================================
   レスポンシブ対応
   ============================================================ */

@media screen and (max-width: 768px) {
    .eco-modal-dialog,
    .eco-alert-dialog-wrapper,
    .eco-confirm-dialog-wrapper {
        width: calc(100% - 20px) !important;
        left: 10px !important;
    }
}

/* ============================================================
   alphacube互換スタイル（旧PWCテーマ）
   ============================================================ */

/* alphacubeテーマのプログレス表示互換 */
.alphacube_progress {
    background: #fff url('../img/eos/loading.gif') center center no-repeat;
}

/* alphacubeテーマ：ダイアログ外枠を白に */
.eco-modal-dialog.alphacube {
    border: 1px solid #999;
    border-radius: 5px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* alphacubeテーマ：タイトルバーを白背景に */
.eco-modal-dialog.alphacube .ui-dialog-titlebar {
    position: relative;
    padding: 4px 80px 4px 8px;
    background: #fff;
    border: none;
    border-bottom: 1px solid #ccc;
    border-radius: 4px 4px 0 0;
    min-height: 20px;
}

/* カスタムダイアログボタン共通スタイル */
.eco-modal-dialog.alphacube .eco-dialog-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    padding: 0;
    margin: 0;
    background: #808080;
    border: 1px solid #666;
    border-radius: 2px;
    cursor: pointer;
    overflow: hidden;
}

.eco-modal-dialog.alphacube .eco-dialog-btn:hover {
    background: #666;
}

/* ボタン内アイコン */
.eco-modal-dialog.alphacube .eco-dialog-btn .eco-btn-icon {
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    line-height: 16px;
    text-align: center;
}

/* 閉じるボタン */
.eco-modal-dialog.alphacube .eco-dialog-btn-close {
    right: 6px;
}

/* 最大化ボタン */
.eco-modal-dialog.alphacube .eco-dialog-btn-maximize {
    right: 28px;
}

.eco-modal-dialog.alphacube .eco-dialog-btn-maximize .eco-btn-icon {
    font-size: 11px;
    line-height: 15px;
}

/* 最小化ボタン */
.eco-modal-dialog.alphacube .eco-dialog-btn-minimize {
    right: 50px;
}

/* コンテンツ領域を白背景に */
.eco-modal-dialog.alphacube .ui-dialog-content {
    background: #fff;
    padding: 0;
}
