/**
 * Public-facing styles for Kurasuba Marche Manager
 *
 * @package    Kurasuba_Marche_Manager
 * @subpackage Kurasuba_Marche_Manager/public/css
 */

/* ==========================================================================
   Form Wrapper
   ========================================================================== */

.kurasuba-marche-entry-wrapper {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
}

/* ==========================================================================
   Error Messages
   ========================================================================== */

.kurasuba-marche-error-message {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.kurasuba-marche-error-message ul {
    margin: 0;
    padding-left: 20px;
    color: #dc2626;
}

.kurasuba-marche-error-message li {
    margin-bottom: 4px;
}

/* ==========================================================================
   Step Titles
   ========================================================================== */

.marche-step-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e3a5f;
    margin-top: 32px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #1e3a5f;
}

.marche-step-title:first-of-type {
    margin-top: 0;
}

/* ==========================================================================
   Form Groups
   ========================================================================== */

.marche-form-group {
    margin-bottom: 20px;
}

.marche-form-group > label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #374151;
}

.marche-form-group .required {
    color: #dc2626;
}

.marche-form-group .description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 4px;
}

/* ==========================================================================
   Input Fields
   ========================================================================== */

.marche-form-group input[type="text"],
.marche-form-group input[type="email"],
.marche-form-group input[type="url"],
.marche-form-group input[type="tel"],
.marche-form-group select,
.marche-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.marche-form-group input[type="text"]:focus,
.marche-form-group input[type="email"]:focus,
.marche-form-group input[type="url"]:focus,
.marche-form-group input[type="tel"]:focus,
.marche-form-group select:focus,
.marche-form-group textarea:focus {
    outline: none;
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.marche-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* ==========================================================================
   Radio Groups (Horizontal) - 区分など
   ========================================================================== */

.marche-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.marche-radio-group label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: normal;
    margin: 0; /* Reset margin for all labels */
}

.marche-radio-group label:last-child {
    margin-bottom: 0; /* Ensure last item has no bottom margin */
}

.marche-radio-group input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

/* ==========================================================================
   Radio Groups (Vertical) - カテゴリなど
   ========================================================================== */

.marche-radio-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.marche-radio-group-vertical label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: background-color 0.2s, border-color 0.2s;
}

.marche-radio-group-vertical label:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

.marche-radio-group-vertical input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

/* ==========================================================================
   Checkbox Groups (Vertical) - イベント選択など
   ========================================================================== */

.marche-checkbox-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.marche-checkbox-group-vertical label,
.marche-event-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: background-color 0.2s, border-color 0.2s;
    font-weight: normal;
    line-height: 1.4;
}

.marche-checkbox-group-vertical label:hover,
.marche-event-checkbox:hover {
    background-color: #f0f7ff;
    border-color: #1e3a5f;
}

.marche-checkbox-group-vertical input[type="checkbox"],
.marche-event-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin: 0;
    cursor: pointer;
    accent-color: #1e3a5f;
}

/* Selected state for event checkboxes */
.marche-checkbox-group-vertical label:has(input:checked),
.marche-event-checkbox:has(input:checked) {
    background-color: #e8f4fd;
    border-color: #1e3a5f;
}

/* Fallback for browsers without :has() support */
.marche-event-checkbox.is-checked {
    background-color: #e8f4fd;
    border-color: #1e3a5f;
}

/* No events message */
.marche-no-events {
    padding: 20px;
    background-color: #f9fafb;
    border-radius: 8px;
    text-align: center;
    color: #6b7280;
}

/* ==========================================================================
   Checkbox Label (Agreement)
   ========================================================================== */

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-top: 2px;
    cursor: pointer;
}

.checkbox-label a {
    color: #1e3a5f;
    text-decoration: underline;
}

.checkbox-label a:hover {
    color: #0d2340;
}

/* ==========================================================================
   Submit Button
   ========================================================================== */

.marche-submit-wrapper {
    margin-top: 32px;
    text-align: center;
}

.marche-submit-btn {
    display: inline-block;
    padding: 16px 48px;
    background-color: #1e3a5f;
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.marche-submit-btn:hover {
    background-color: #0d2340;
}

.marche-submit-btn:active {
    transform: scale(0.98);
}

/* ==========================================================================
   Completion Page
   ========================================================================== */

.kurasuba-marche-completion-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

.kurasuba-marche-completion-wrapper h3 {
    font-size: 1.5rem;
    color: #1e3a5f;
    margin-bottom: 20px;
}

.kurasuba-marche-completion-wrapper p {
    margin-bottom: 16px;
    line-height: 1.6;
}

.kurasuba-marche-caution {
    background-color: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 16px;
    margin: 24px 0;
    text-align: left;
}

.kurasuba-marche-caution p {
    margin-bottom: 8px;
    font-weight: 600;
    color: #92400e;
}

.kurasuba-marche-caution ul {
    margin: 0;
    padding-left: 20px;
    color: #78350f;
}

.kurasuba-marche-caution li {
    margin-bottom: 4px;
}

.kurasuba-marche-completion-wrapper .button {
    display: inline-block;
    padding: 12px 32px;
    background-color: #1e3a5f;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.kurasuba-marche-completion-wrapper .button:hover {
    background-color: #0d2340;
    color: #ffffff;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 640px) {
    .kurasuba-marche-entry-wrapper {
        padding: 16px;
    }

    .marche-radio-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .marche-submit-btn {
        width: 100%;
        padding: 16px 24px;
    }
}
