﻿@charset 'utf-8';

body, html {
    overflow-x: hidden;
    background-color: #f9f9f9;
    padding: 0px;
    color: #333;
}

.displayNone {
    display: none;
}

.form-container {
    max-width: 500px;
    margin: 0 auto;
    background: #f9f9f9;
    padding: 0px;
}

h1 {
    color: #006699;
    font-size: 18px;
    border-bottom: 2px solid #006699;
    padding-bottom: 5px;
    margin-bottom: 0px;
}

.section-title-st {
    font-weight: bold;
    margin: 0px 0 10px 0;
}

.section-title {
    font-weight: bold;
    margin: 20px 0 10px 0;
}

.fieldset-box {
    border: 2px solid #28a745;
    border-radius: 12px;
    padding: 20px 20px 20px 20px;
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 15px;
}

label {
    display: block;
    background-color: #ffe599;
    border: 1px solid #333;
    padding: 4px 10px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
}

    label .required {
        color: #d9534f;
        margin-left: 5px;
    }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #333;
    border-top: none;
    box-sizing: border-box;
    font-size: 16px;
}

textarea {
    height: 100px;
    resize: vertical;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fcustom-svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 12px auto;
}

/* New styles for the agreement section */
.agreement-box {
    border: 2px solid #a52a2a; /* Dark red border */
    border-radius: 8px;
    padding: 15px;
    font-size: 13px;
    line-height: 1.6;
    background-color: #fff;
}

.agreement-content ul {
    list-style: none;
    padding-left: 10px;
    margin-top: 5px;
}

.agreement-content li::before {
    content: "・";
}
/* Container for the checkbox and text */
.checkbox-line {
    text-align: center;
    margin: 5px 0;
}

    .checkbox-line label {
        background: none; /* Remove the yellow background from previous labels */
        border: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 13px;
        font-weight: normal;
    }

    /* The actual checkbox */
    .checkbox-line input[type="checkbox"] {
        width: 15px;
        height: 15px;
        margin-right: 8px; /* Space between box and text */
        cursor: pointer;
    }

/* Specifically for the anonymous box with the black border */
.anonymous-box {
    border: 1px solid #333;
    padding: 2px 0;
    width: 100%;
}

.yellow-bar {
    background-color: #ffd966;
    padding: 8px;
    font-weight: bold;
    text-align: center;
    margin-top: 20px;
}

/* Styling for the final fields */
.final-fields {
    margin-top: 20px;
}

.date-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #333;
    border-top: none;
    padding: 5px;
    background-color: white;
}

    .date-selector select {
        width: 60px;
        margin: 0 5px;
        border: 1px solid #ccc;
        padding: 2px;
        appearance: auto; /* Uses standard browser dropdown arrow */
    }

    .date-selector span {
        font-size: 14px;
    }

/* Submit Button Styling */
.button-container {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 50px;
}

.submit-btn {
    background-color: #009944; /* Green color from image */
    color: white;
    border: none;
    padding: 10px 60px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50px; /* pill shape */
    cursor: pointer;
    transition: background-color 0.3s;
}

    .submit-btn:hover {
        background-color: #007a36;
    }

.year-select, .month-select, .day-select {
    text-align: center;
    text-align-last: center;
    width: 60px;
    padding: 0px 0px 0px 0px;
    height: 30px
}

.date-selector select.year-select {
    appearance: none;
}

.region-select {
    appearance: auto;
}

/* Red border for invalid fields */
.is-invalid {
    border: 2px solid #d9534f !important;
    background-color: #fff2f2 !important;
}

/* Style for checkboxes when they are invalid */
.checkbox-invalid {
    outline: 2px solid #d9534f;
    outline-offset: 2px;
}

/* Layout for the Row */
.upload-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    width: 100%;
}

/* Simple Green Button */
.custom-file-btn {
    flex-shrink: 0;
    background: #fff;
    color: #2e7d32;
    border: 1.5px solid #2e7d32;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
}

/* Truncated Text Logic */
#file-name {
    flex-grow: 1;
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* This creates the "..." */
    max-width: 180px; /* Adjust this to hide text sooner/later */
}

    #file-name::before {
        content: "●";
        margin-right: 5px;
        color: #ccc;
    }

/* Blank Preview Box */
.preview-box {
    width: 100%;
    height: 300px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: #fdfdfd;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

#preview-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-uploader {
    padding: 20px 20px 10px 20px;
    margin-bottom: 20px;
}

.image-title {
    margin: 30px 0 10px 0;
}

.placeholder-text {
    display: flex;
    justify-content: center;
    align-content: center;
    align-items: center;
    flex-wrap: wrap;
}

input[type="date"] {
    /* 1. Remove iOS default styling */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* 2. Force the width and box model */
    display: block; /* Essential for iOS to respect 100% width */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    /* 3. Your specific design */
    padding: 10px 8px; /* Slightly more padding for touch targets */
    border: 1px solid #333;
    border-top: none;
    /* 4. Fix font and height issues */
    font-size: 16px; /* Prevents iOS from auto-zooming when clicked */
    min-height: 40px; /* Ensures the box doesn't look flat on mobile */
    background-color: #fff;
    border-radius: 0; /* iOS adds rounded corners by default */
}

/* Removes the default internal padding/icons in Webkit (Safari/Chrome) */
input[type="date"]::-webkit-inner-spin-button,
input[type="date"]::-webkit-calendar-picker-indicator {
    /* If you want to keep the icon but fix layout, leave this. 
    If you want to hide the icon entirely, use: 
    display: none; -webkit-appearance: none; */
}

/* The Green Button */
.action-btn {
    width: 100%;
    height: 60px;
    background-color: #009944;
    color: white;
    border: none;
    padding: 0px 0px 0px 0px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0px 10px 0px;
    font-size: 16px;
}

/* Ensure the expanding box doesn't break the layout when closed */
.expandable-box {
    height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    /*background: #f5f5f5;*/
    background-color: #fee496;
    /* When closed, this has 0 margin and 0 height */
}

.expandable-box.open {
    height: 300px;
    margin-top: 2px; /* Spacing when open */
    border: 1px solid #ddd;
    padding: 1px 1px 1px 1px;
    overflow-y:auto;
}

input[disabled] + span {
    color: #ccc; /* Make text look disabled */
}

.disabled-style {
    background-color: #ccc !important;
    color: #888 !important;
    cursor: not-allowed !important;
    pointer-events: none; /* This prevents the click event from firing on iPhone/Chrome */
    opacity: 0.6;
}