/**
 * Counseling Reservation Entry Form Styles
 * Extends the main app.css styles with form-specific styling
 */

/* Privacy Policy Box */
.jms-privacy-policy-box {
    max-height: 250px;
    overflow-y: scroll;
    border: 1px solid #ddd;
    padding: 20px;
    background-color: #ffffff;
    margin-bottom: 20px;
}

.jms-privacy-content {
    line-height: 1.8;
}

.jms-privacy-content p {
    margin-bottom: 15px;
}

.jms-privacy-content strong {
    font-weight: 600;
}

/* Form Notes and Warnings */
.jms-form-note {
    margin: 10px 0;
    font-size: .875rem;
    color: #666;
}

.danger-label {
    color: #d32f2f;
    font-weight: 500;
}

/* Form Subtitle */
.jms-form-subtitle {
    font-size: 18px;
    font-weight: 600;
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1976d2;
}

/* Section Title */
.jms-form-section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 10px;
    color: var(--color-body);
}

/* Select Inputs */
.jms-select {
    width: 100%;
    max-width: 500px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: .875rem;
    background-color: #fff;
    transition: border-color 0.2s;
}

.jms-select:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
}

/* Textarea */
.jms-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: .875rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
}

.jms-textarea:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
}

/* Input Fields */
.jms-input {
    width: 100%;
    max-width: 500px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: .875rem;
    transition: border-color 0.2s;
}

.jms-input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
}

.jms-input-small {
    width: auto;
    max-width: 120px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: .875rem;
}

/* Inline Inputs */
.jms-inline-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.jms-mini-label {
    font-size: .875rem;
    color: #666;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    flex: 1 1 0;
    min-width: 0;
}

/* Radio and Checkbox Groups */
.jms-radio-group,
.jms-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.jms-radio-item,
.jms-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.jms-radio-item:hover,
.jms-checkbox-item:hover {
    background-color: #f5f5f5;
}

.jms-radio-item input[type="radio"],
.jms-checkbox-item input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

/* Screen Reader Only */
.jms-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .jms-privacy-policy-box {
        padding: 15px;
    }

    .jms-select,
    .jms-input,
    .jms-textarea {
        max-width: 100%;
    }

    .jms-inline-inputs {
        flex-direction: column;
        align-items: flex-start;
    }

    .jms-form-subtitle {
        font-size: 16px;
    }

    .jms-form-section-title {
        font-size: .875rem;
    }
}

/* Additional Form Field Spacing */
.jms-form-field {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
    overflow: visible; /* app.css の overflow:hidden を上書き */
}

.jms-form-field:last-child {
    border-bottom: none;
}

/* Label with Required Mark */
.jms-label-with-required {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.jms-label-text {
    font-weight: 600;
    font-size: .875rem;
    color: var(--color-body);
}

.jms-required-mark {
    color: #d32f2f;
    font-weight: 600;
    font-size: .75rem;
}

/* Input Container */
.jms-input-container {
    margin-top: 8px;
}

/* Fieldset Styling */
.jms-fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

/* Completion Page Styles */
.jms-completion-section {
    padding: 40px 20px;
    text-align: center;
}

.jms-completion-subtitle {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--color-body);
    border-bottom: 2px solid var(--color-common);
    padding-bottom: 10px;
    display: inline-block;
}

.jms-completion-message {
    background-color: #f0fff4;
    border: 2px solid var(--color-common);
    border-radius: 8px;
    padding: 30px 20px;
    margin: 30px auto;
    max-width: 600px;
}

.jms-completion-message p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-body);
    margin-bottom: 15px;
}

.jms-completion-message p:last-child {
    margin-bottom: 0;
}

.jms-completion-actions {
    margin-top: 40px;
}

.jms-completion-btn {
    display: inline-block;
    background-color: var(--color-common);
    color: var(--color-white);
    padding: 12px 40px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.jms-completion-btn:hover {
    background-color: #006F01;
    color: var(--color-white);
    text-decoration: none;
}

/* Responsive for Completion Page */
@media (max-width: 768px) {
    .jms-completion-section {
        padding: 30px 15px;
    }

    .jms-completion-subtitle {
        font-size: 18px;
    }

    .jms-completion-message {
        padding: 20px 15px;
    }

    .jms-completion-message p {
        font-size: .875rem;
    }

    .jms-completion-btn {
        padding: 10px 30px;
        font-size: .875rem;
    }
}
