/* eSIM Reissue Specific Styles */
.reissue-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.reissue-header {
    text-align: center;
    margin-bottom: 30px;
}

.reissue-form {
    background: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.reissue-notice {
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 15px;
    margin-bottom: 20px;
}

.reissue-button {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.reissue-button:hover {
    background-color: #0056b3;
}

/* Status indicators */
.reissue-status {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
}

.reissue-status.success {
    background-color: #d4edda;
    color: #155724;
}

.reissue-status.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* 全体のレイアウト */
.checkout-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 992px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
}

/* カード共通スタイル */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

/* 再発行情報カード */
.reissue-info .info-content {
    color: #4a5568;
}

.reissue-info .alert {
    margin-bottom: 0;
}

.reissue-info ul {
    padding-left: 1.5rem;
}

.reissue-info li {
    margin-bottom: 0.5rem;
}

/* 現在のプラン情報 */
.current-plan .plan-details {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
}

.plan-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.plan-info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #64748b;
    font-size: 0.9rem;
}

.info-value {
    font-weight: 500;
    color: #1a1a1a;
}

/* フォーム要素 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #1a1a1a;
}

.required-mark {
    color: #dc2626;
    margin-left: 0.25rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control.auto-filled {
    background-color: #f0fff4;
    border-color: #68d391;
}

.form-control.auto-filled:focus {
    border-color: #48bb78;
    box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.1);
}

.text-muted {
    color: #64748b !important;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* リンクとボタン */
.notice-links {
    margin-top: 0.75rem;
}

.eid-notice-link {
    display: inline-flex;
    align-items: center;
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.875rem;
    margin-right: 1rem;
}

.eid-notice-link:hover {
    text-decoration: underline;
}

.eid-notice-link i {
    margin-right: 0.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: #3b82f6;
    color: #fff;
    width: 100%;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-secondary {
    background-color: #e2e8f0;
    color: #1a1a1a;
}

.btn-secondary:hover {
    background-color: #cbd5e1;
}

/* セキュリティ通知 */
.security-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.875rem;
    margin-top: 1.5rem;
}

.security-notice i {
    margin-right: 0.5rem;
    color: #10b981;
}

/* モーダル */
.modal-content {
    border-radius: 12px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 1.25rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 600;
    color: #1a1a1a;
}

/* アラート */
.alert {
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.alert-info {
    background-color: #eff6ff;
    border: 1px solid #dbeafe;
    color: #1e40af;
}

.alert-warning {
    background-color: #fffbeb;
    border: 1px solid #fef3c7;
    color: #92400e;
}

/* トースト */
.toast-container {
    z-index: 1050;
}

.toast {
    background-color: #dc2626;
    color: #fff;
    border-radius: 8px;
}

.btn-close-white {
    filter: brightness(0) invert(1);
}

/* チェックボックス */
.form-check {
    display: flex;
    align-items: center;
}

.form-check-input {
    margin-right: 0.5rem;
}

.form-check-label {
    font-size: 0.875rem;
    color: #4a5568;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .checkout-container {
        margin: 1rem auto;
    }

    .card {
        padding: 1rem;
    }

    .modal-dialog {
        margin: 0.5rem;
    }
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 300px;
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
        max-height: 300px;
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
        max-height: 0;
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.reissue-section {
    animation: fadeIn 0.4s ease-out forwards;
}

/* 再発行タイプ選択 */
.reissue-type-options {
    display: grid;
    gap: 1.5rem;
}

.reissue-type-option {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    transform: translateY(0);
}

.reissue-type-option:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.15);
}

.reissue-type-option.selected {
    animation: selectOption 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes selectOption {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
        background-color: #f8faff;
        border-color: #3b82f6;
        box-shadow: 0 8px 16px rgba(59, 130, 246, 0.15);
    }
}

.option-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.option-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.option-title i {
    font-size: 1.75rem;
    color: #3b82f6;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f7ff;
    border-radius: 10px;
}

.option-title h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
    white-space: nowrap;
}

.option-price {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    text-align: right;
}

.tax-included {
    display: block;
    font-size: 0.75rem;
    font-weight: normal;
    color: #64748b;
    margin-top: 0.25rem;
}

.option-description {
    color: #4a5568;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

.option-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    flex-grow: 1;
}

.option-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #4a5568;
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.4;
}

.option-features li i {
    color: #10b981;
    font-size: 1rem;
    flex-shrink: 0;
}

.select-type-btn {
    width: 100%;
    padding: 1rem;
    border: 1.5px solid #3b82f6;
    color: #3b82f6;
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: auto;
}

.select-type-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.2);
}

.reissue-type-option.selected .select-type-btn {
    background: #3b82f6;
    color: #fff;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2);
}

@media (min-width: 768px) {
    .reissue-type-options {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .reissue-type-option {
        padding: 1.5rem;
        min-height: auto;
    }

    .option-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .option-price {
        text-align: left;
    }

    .tax-included {
        display: inline;
        margin-left: 0.5rem;
    }

    .option-title h3 {
        font-size: 1.25rem;
    }

    .option-features {
        margin-bottom: 1.5rem;
    }

    .select-type-btn {
        padding: 0.875rem;
    }
}

/* セクションヘッダー */
.section-header {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.section-description {
    font-size: 1.125rem;
    color: #4a5568;
    max-width: 600px;
    margin: 0 auto;
}

/* 戻るボタン */
.back-button {
    display: inline-flex;
    align-items: center;
    color: #4a5568;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0;
    margin-bottom: 1rem;
}

.back-button i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.back-button:hover {
    color: #2d3748;
}

/* 選択されたタイプ情報 */
.selected-type-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
}

.selected-type-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: #1a1a1a;
}

.selected-type-badge i {
    color: #3b82f6;
    font-size: 1.25rem;
}

.selected-type-price {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 1.25rem;
}

/* 新しいEID入力欄のアニメーション */
#newEidGroup {
    display: none;
    opacity: 0;
    overflow: hidden;
}

#newEidGroup.show {
    display: block;
    animation: slideDown 0.4s ease-out forwards;
}

#newEidGroup.hide {
    animation: slideUp 0.4s ease-out forwards;
}

/* レスポンシブ対応の追加 */
@media (max-width: 767px) {
    .section-title {
        font-size: 1.5rem;
    }

    .section-description {
        font-size: 1rem;
    }

    .selected-type-info {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .selected-type-badge {
        font-size: 0.875rem;
    }

    .selected-type-price {
        font-size: 1.125rem;
    }
}

/* ボタンのアニメーション */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:active {
    transform: scale(0.98);
}

/* セクション切り替えのアニメーション */
.section-transition {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-transition.hide {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.section-transition.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* フォームのフェードインアニメーション */
@keyframes formFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-fade-in {
    animation: formFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.form-group {
    opacity: 0;
    animation: formFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* フォームグループの段階的なフェードイン */
.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }

/* 戻るボタンのアニメーション */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.back-button {
    animation: slideInLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 選択されたタイプ情報のアニメーション */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.selected-type-info {
    animation: slideInDown 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 対応機種一覧モーダル */
#deviceListModal .modal-dialog {
    max-width: 800px;
}

#deviceListModal .nav-pills {
    gap: 1rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
}

#deviceListModal .nav-pills .nav-link {
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
}

#deviceListModal .nav-pills .nav-link.active {
    background: #0d6efd;
    color: white;
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
}

.device-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.device-category {
    background: #fff;
    border-radius: 0.5rem;
    padding: 1rem;
}

.device-category-title {
    color: #212529;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.device-item {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    color: #495057;
    transition: all 0.2s ease;
}

.device-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.device-note .alert {
    border-radius: 0.5rem;
    border: none;
    background-color: #cfe2ff;
    color: #084298;
}

.device-note .alert ul {
    padding-left: 1.5rem;
}

.device-note .alert li {
    margin-bottom: 0.5rem;
}

.device-note .alert li:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .device-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    #deviceListModal .nav-pills {
        gap: 0.5rem;
    }

    #deviceListModal .nav-pills .nav-link {
        padding: 0.5rem 1rem;
    }
}

/* フォームバリデーションスタイル */
.form-control:invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid {
    border-color: #198754;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-valid:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
} 
