/* Event Confirmation Styles */

.jms-form-title {
    font-size: 1.8rem;
}

/* Content Display Area */
.jms-confirmation-content-area {
    margin-bottom: 2rem;
    border: 2px solid #ccc;
    border-radius: 4px;
}

.jms-confirmation-header {
    background-color: #f0f0f0;
    padding: 0.75rem 1rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-body);
    border-bottom: 2px solid #ccc;
}

.jms-confirmation-content {
    padding: 2rem;
    min-height: 200px;
}

.jms-confirmation-data {
    font-size: 1.3rem;
    color: var(--color-body);
    line-height: 1.6;
}

/* Form inside confirmation area */
.jms-form-readonly {
    background: transparent;
    margin: 0;
    padding: 0;
}

/* Disable all form interactions in readonly mode */
.jms-form-readonly input[disabled],
.jms-form-readonly textarea[disabled],
.jms-form-readonly select[disabled],
.jms-form-readonly button[disabled] {
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.6;
    background-color: #f5f5f5;
}

.jms-form-readonly button[disabled] {
    background-color: #e0e0e0 !important;
    color: #999 !important;
    border-color: #ccc !important;
}

.jms-form-title-sub {
    font-size: 1.3rem;
    font-weight: 600;
    color: #198ec5;
    margin-top: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #0073aa;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    padding-left: 0.75rem;
    background-color: #b9d6e5;
}

.jms-confirmation-button-row {
    padding: 1rem;
    text-align: right;
    background-color: #fff;
    border-top: 1px solid #ccc;
}

.jms-confirmation-button-row .jms-btn {
    font-size: 1.3rem;
}

/* Action Buttons */
.jms-confirmation-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.jms-btn-action {
    background: #f0f0f0;
    color: var(--color-body);
    border: 1px solid #ccc;
    padding: 0.8rem 2rem;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: 600;
    border-radius: 4px;
    transition: background 0.3s;
    text-align: center;
}

.jms-btn-action:hover {
    background: #e0e0e0;
}

/* History Section */
.jms-confirmation-history-section {
    margin-top: 3rem;
}

.jms-confirmation-history-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-body);
    margin-bottom: 1rem;
}

/* History Table */
.jms-confirmation-table-container {
    overflow-x: auto;
    margin-bottom: 2rem;
}

.jms-confirmation-history-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border: 1px solid #ccc;
}

.jms-confirmation-history-table thead {
    background-color: #e8f2f7;
}

.jms-confirmation-history-table th {
    padding: 0.75rem 1rem;
    text-align: center;
    font-weight: 600;
    color: var(--color-body);
    border: 1px solid #ccc;
    font-size: 1.3rem;
}

.jms-confirmation-history-table td {
    padding: 0.75rem 1rem;
    border: 1px solid #ccc;
    font-size: 1.2rem;
    color: var(--color-body);
    vertical-align: top;
}

.jms-confirmation-history-table th:nth-child(1),
.jms-confirmation-history-table td:nth-child(1) {
    width: 60px;
    text-align: center;
}

.jms-confirmation-history-table th:nth-child(2),
.jms-confirmation-history-table td:nth-child(2) {
    width: 150px;
    text-align: center;
}

.jms-confirmation-history-table th:nth-child(3),
.jms-confirmation-history-table td:nth-child(3) {
    width: auto;
    text-align: left;
}

/* History Content */
.jms-history-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.jms-history-type {
    font-weight: 600;
    color: var(--color-body);
}

.jms-history-detail {
    color: #555;
    line-height: 1.5;
}

/* 長文テキスト（イベント内容など）の折返し対策 */
.jms-form-field {
    overflow: visible; /* app.css の overflow:hidden を上書き */
}

.jms-mini-label {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    flex: 1 1 0;
    min-width: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .jms-confirmation-content {
        padding: 1rem;
        min-height: 150px;
    }

    .jms-confirmation-actions {
        gap: 0.75rem;
    }

    .jms-btn-action {
        padding: 0.75rem 1rem;
        font-size: 1.1rem;
    }

    .jms-confirmation-history-table {
        font-size: 0.9rem;
    }

    .jms-confirmation-history-table th,
    .jms-confirmation-history-table td {
        padding: 0.5rem;
        font-size: 1rem;
    }

    .jms-confirmation-history-table th:nth-child(2),
    .jms-confirmation-history-table td:nth-child(2) {
        width: 120px;
    }
}
