/* Specific styles for MaihamaEurasia application */

/* Member page styles */
.member-info {
    background-color: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.member-info h2 {
    color: #595757;
    margin-top: 0;
    font-size: 1.2em;
}

.member-info p {
    margin: 5px 0;
}

/* .member-card {
    background: #F5DEC7;
    color: #595757;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
} */

.member-card h3 {
    margin-top: 0;
    color: #595757;
}

.member-info-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #995959;
}

/* Complete page container */
.complete-container {
    max-width: 400px;
    margin: 0 auto;
    /* padding: 20px 0; */
}

@media (max-width: 768px) {
    .complete-container {
        max-width: 100%;
        /* padding: 0 15px; */
    }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .member-info-container {
        padding: 15px;
    }
}

/* Point history styles */
.point-info {
    background-color: #ffffff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.point-info h2 {
    color: #3e3a39;
    margin-top: 0;
}

.point-history {
    background-color: #ffffff;
    border-radius: 5px;
}

.point-history table {
    width: 100%;
    border-collapse: collapse;
}

.point-history th {
    background-color: #ffffff;
    color: #3e3a39;
    padding: 10px;
    text-align: left;
}

.point-history td {
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Coupon styles */
.coupon-section {
    padding: 10px;
}

.coupon-list {
    margin-top: 20px;
}

.coupon-item {
    background-color: #FDF2F3;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
}

.coupon-item-info {
    background-color: #ffffff;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.coupon-item h3 {
    margin-top: 0;
    color: #3e3a39;
}

.coupon-details {
    margin-top: 10px;
}

.coupon-details p {
    margin: 5px 0;
}

.coupon-page .button-group {
    text-align: center;
}

.coupon-page .button-group .release-button {
    width: 30%;
    display: block;
    box-sizing: border-box;
    margin: 0 10px;
}

.coupon-list li {
    display: flex;
    /* justify-content: space-between; */
    padding: 8px 0;
}

.coupon-list-item .coupon-remains {
    flex: 0 0 auto;
    text-align: right;
    white-space: nowrap;
    margin-left: auto;
}

.coupon-name, .coupon-remains {
    flex: 1;
    text-align: center;
}

.coupon-expiration {
    flex: 1.5;
    text-align: center;
}

.coupon-current-date {
    font-size: 14px;
    color: #3e3a39;
    margin: 0 0 8px 0;
}

.coupon-table-wrap {
    margin-top: 8px;
}

.member-info-container .coupon-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.member-info-container .coupon-table th {
    background-color: #ffffff;
    color: #3e3a39;
    padding: 8px 6px;
    text-align: left;
    white-space: nowrap;
}

.member-info-container .coupon-table td {
    padding: 8px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.coupon-name {
    text-align: left;
}

.coupon-remains {
    text-align: right;
}

.coupon-none {
    text-align: center;
    margin-top: 0px;
}

.coupon-none p {
    margin: 0;
}

.coupon-name-cell {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-info-container .coupon-table th:nth-child(2),
.member-info-container .coupon-table .coupon-remains-cell {
    width: 4em;
    min-width: 4em;
    max-width: 4em;
    box-sizing: border-box;
    text-align: left;
}

/* Admission history styles */
.admission-history {
    margin-top: 20px;
}

.admission-history table {
    width: 100%;
    border-collapse: collapse;
}

.admission-history th {
    background-color: rgba(255,255,255,0.1);
    color: #595757;
    padding: 10px;
    text-align: left;
}

.admission-history td {
    padding: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Login and Entry form styles */
.form-control {
    width: 100%;
    padding: 0.375rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: #ffffff;
    color: #000000;
    font-size: 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: #000000;
    background-color: #ffffff;
}

.form-control::placeholder {
    color: #999;
}

/* 編集不可項目の表示 */
.readonly-field {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: #f0f0f0;
    color: #3e3a39;
    font-size: 16px;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Button styles */
/* .btn-primary {
    background-color: #F5DEC7;
    color: #595757;
    border: 2px solid #595757;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    transition: background-color 0.3s;
} */

/* .btn-primary:hover {
    background-color: #134a5c;
} */

/* Error message styles */
.error-message {
    color: #ff6b6b;
    background-color: rgba(255,107,107,0.1);
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Success message styles */
.success-message {
    color: #489EA6;
    background-color: rgba(76,175,80,0.1);
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Additional styles from blade files */
.sub-header {
    text-align: center;
    font-weight: bold;
    font-size: 24px;
}

.amount {
    font-size: 34px;
}


.info-container .button {
    display: inline-block;
    margin: 15px auto 0;
    width: 30%;
}

/* Header styles */
/* header {
    text-align: center;
    padding: 15px;
    background-color: #ffffff;
} */

/* header h1 {
    color: #003559;
    margin: 0 0 15px 0;
    font-size: 1.5em;
    border-radius: 0.5em;
    background-color: #ffffff;
    border: 2px solid #003559;
} */    

/* Logo styles */
header .logo-wrapper {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    overflow: hidden;
    display: flex;  
    align-items: center;  
    justify-content: center;
    padding: 15px 0 0 0;
}

header .logo {
    width: 45%;
    height: 45%;
    object-fit: cover;
    display: block;
}

/* Point date alignment */
.point-date {
    text-align: right;
}

/* Text center utility */
.text-center {
    text-align: center;
}

/* Container styles */
/* main {
    padding: 15px;
} */

/* Form container styles */
.form-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
}

@media (max-width: 768px) {
    .form-container {
        max-width: 100%;
        padding: 15px;
    }
}

/* Info container styles */
.info-container {
    background: #FDF2F3;
    border-radius: 8px;
    padding: 20px;
    margin: 0 10px 20px 10px;
    text-align: center;
    border: 1px solid #FAF3E8;
}

.info-container .button-group .release-button {
    margin: 0 10px;
}

/* Button styles */
.button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
    margin: 20px 0 20px 0;
    width: 100%;
}

/* button-group layout-left-center styles */
.button-group.layout-left-center {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
    min-height: 50px;  /* 追加: ボタンの高さ分を確保 */
}

.button-group.layout-left-center > :first-child {
    position: absolute;
    left: 0;
    width: 20%;
    min-width: 60px;
    max-width: 90px;
    padding: 12px 10px;  /* 上下12px、左右10px */
    font-size: 14px;
}

.button-group.layout-left-center > :last-child {
    width: 60%;
    min-width: 100px;
    max-width: 200px;
    padding: 12px 20px;  /* 上下12px、左右20px */
    margin: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    /* border: 1px solid #d4263a; */
    font-size: 14px;
}

/* 中央に配置するための調整 */
.button-group.layout-left-center::after {
    content: '';
    flex: 1;
    max-width: 25%;  /* 左側と同じ幅を確保して中央に見せる */
}

.button.button--middle-width {
    width: 60%;
    display: block;
}

/* Member page button full width */
.info-container .button,
.member-info-container .button {
    width: 100%;
    display: block;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .button-group {
        gap: 10px;
    }

    .button-group.layout-left-center {
        gap: 0;
        min-height: 44px;
    }
    
    .button-group.layout-left-center > :first-child {
        width: 20%;
        min-width: 55px;
        max-width: 75px;
        font-size: 13px;
        padding: 10px 8px;
    }
    
    .button-group.layout-left-center > :last-child {
        width: 50%;
        min-width: 120px;
        /* max-width: 150px; */
        font-size: 13px;
        padding: 12px 15px;
        left: 50%;
        transform: translateX(-50%);
    }

    .button--middle-width {
        width: 60%;
    }
}

.button, .release-button {
    width: 30%;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
    display: block;
    box-sizing: border-box;
}

.button-group .button,
.button-group .release-button {
    width: auto;
    min-width: 150px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.button {
    background: #d4263a;
    color: #ffffff;
    /* border: 1px solid #ffffff; */
}

.release-button {
    background: #808080;
    color: #ffffff;
    border: 1px solid #ffffff;
}

/* Form styles */
.form-group {
    margin-bottom: 15px;
    width: 100%;
}

/* .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #595757;
} */

.required {
    color: #ff6b6b;
    margin-left: 4px;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #595757;
}

.help-text {
    font-size: 0.8em;
    color: #595757;
    margin-top: 4px;
    padding: 0 5px;
}

/* Form container styles */
.form-container p {
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Responsive styles */
@media (max-width: 768px) {
    header {
        padding: 10px;
    }

    .form-container, .info-container {
        padding: 10px;
    }

    .member-card {
        padding: 15px;
    }

    .point-history th,
    .point-history td,
    .admission-history th,
    .admission-history td {
        padding: 8px;
        font-size: 14px;
    }

    .button, .release-button {
        padding: 10px 20px;
        font-size: 14px;
        width: 60%;
    }

    .form-control {
        padding: 10px;
        font-size: 14px;
    }
}

/* Birthday input styles */
.birthday-inputs {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.birthday-input {
    width: 80px !important;
    text-align: center;
}

.birthday-separator {
    color: #595757;
    font-weight: bold;
    margin: 0 5px;
}

@media (max-width: 768px) {
    .birthday-inputs {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .birthday-input {
        width: 100% !important;
    }
    
    .birthday-separator {
        text-align: center;
        margin: 5px 0;
    }
} 

/* --- 追加: 会員情報ヘッダーの横並び・崩れ防止 --- */
.member-info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: nowrap;
}

.member-info-header .member-details {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
}

/* --- 追加: edit-buttonをbuttonらしく --- */
.member-info-header .edit-button {
    font-size: 12px;
    padding: 4px 12px;
    min-width: 60px;
    height: 28px;
    line-height: 20px;
    box-sizing: border-box;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #3e3a39;
    border-radius: 4px;
    background: #ffffff;
    color: #3e3a39;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.barcode-container svg {
    width: 100% !important;
    height: auto !important;
}

/* モーダルスタイル */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 0;
    text-align: center;
    max-width: 80%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-content p {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: #3e3a39;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-btn {
    padding: 10px 30px;
    border: none;
    border-radius: 0;
    font-size: 14px;
    cursor: pointer;
    min-width: 80px;
}

.modal-btn-yes {
    background-color: #d4263a ;
    color: #ffffff;
}

.modal-btn-no {
    background-color: #808080;
    color: #ffffff;
}

.modal-btn:hover {
    opacity: 0.8;
}

/* Select element styles - match input styles */
.select-container {
    background: #ffffff;
    padding: 0px 20px 20px 20px;
    border-radius: 5px;
    margin: 20px 10px 10px 10px;
    text-align: center;
    border: 1px solid #995959;
}

.select-container .select-text {
    background: #ffffff;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 11px;
}

select.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23595757' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    padding-right: 2rem;
}

select.form-control:focus {
    outline: none;
    color: #495057;
    /* border-color: #003559; */
    background-color: white;
}

/* Complete page specific adjustments (if needed) */
.page-complete .coupon_attention strong {
    font-size: 1.1em;
}

.barcode-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 0;
}

.barcode-container p {
    margin: 0;
}

.barcode-container #qrcode {
    display: inline-block;
}

/* ローディングスピナー */
.loading {
    display: flex;
    flex-direction: column; /* 縦方向に配置 */
    justify-content: center;
    align-items: center;
    min-height: 200px;
    gap: 30px; /* 文章とスピナーの間隔 */
}

/* form-container内のloadingはpaddingを相殺 */
.form-container > .loading {
    width: calc(100% + 40px);
    margin: 0 -20px;
    box-sizing: border-box;
}

.cv-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loading .spinner {
    width: 72px;
    height: 72px;
    border: 6px solid #e8d4d4;
    border-top: 6px solid #995959;
    border-radius: 50%;
    animation: sp-anime 2s infinite linear;
}

.loading p {
    margin: 0;
    color: #3e3a39;
    font-size: 16px;
    text-align: center;
}

@keyframes sp-anime {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
