/* Contact Form Style for Perl 5.30 Compatible Version */
@charset "utf-8";

/* Reset some global overrides from common.css on this page */
.contents { color: #333; }
.contents .full1col { font-size: 16px; line-height: 1.6; }

/* Ensure confirm list text renders with proper size */
.confirm-data dl,
.confirm-data dt,
.confirm-data dd { font-size: 14px; line-height: 1.6; }

/* Ensure paragraphs inside .full1col are visible */
.contents .full1col p { 
    display: block; 
    color: #333; 
    font-size: 14px; 
    line-height: 1.7; 
}

/* Ensure readable text color on form controls */
.contact-form input,
.contact-form textarea,
.contact-form select {
    color: #333;
}

/* New, modernized form styling (scoped) */
.contact-form { 
    margin: 20px auto; 
    max-width: 760px; 
}

.contact-form .form-group {
    margin-bottom: 1.5em;
    padding: 0.75em 0;
    border-bottom: 1px dotted #ccc;
    /* Align label and control on a grid */
    display: grid;
    grid-template-columns: 220px 1fr;
    column-gap: 16px;
    align-items: start; /* align tops */
}

.contact-form .form-group:last-of-type {
    border-bottom: none;
}

.contact-form .form-group label {
    display: inline-flex; /* keep badge next to label text */
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #1a6440; /* site green tone */
    margin: 0; /* avoid pushing input downward */
    font-size: 15px;
}

.badge-required {
    display: inline-block;
    background: #ff6b6b;
    color: #fff;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
}

.contact-form .form-group input[type="text"],
.contact-form .form-group input[type="email"], 
.contact-form .form-group input[type="tel"],
.contact-form .form-group textarea {
    width: 100%;
    max-width: 500px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background: #fdfdfd;
    box-sizing: border-box;
    margin: 0; /* align tops */
}

.contact-form .form-group input[type="text"]:focus,
.contact-form .form-group input[type="email"]:focus,
.contact-form .form-group input[type="tel"]:focus,
.contact-form .form-group textarea:focus {
    border-color: #5794bf;
    outline: none;
    box-shadow: 0 0 3px rgba(87, 148, 191, 0.3);
}

.contact-form .form-group input[name="name"],
.contact-form .form-group input[name="email"],
.contact-form .form-group input[name="phone"] {
    max-width: 300px;
}

.contact-form .form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Mobile: stack label and control */
@media (max-width: 768px) {
  .contact-form .form-group {
    display: block;
  }
  .contact-form .form-group label {
    margin-bottom: 0.5em;
  }
}

.form-submit {
    margin-top: 2em;
    text-align: center;
}

.submit-btn {
    background: #ff0000; /* site accent red */
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
    transition: background .2s ease, transform .05s ease;
}

.submit-btn:hover {
    background: #cc0000;
}

.submit-btn:active {
    transform: translateY(1px);
}

.back-btn {
    background: #1aa540; /* site green */
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
    transition: background .2s ease, transform .05s ease;
}

.back-btn:hover {
    background: #168e37;
}

.back-btn:active { transform: translateY(1px); }

.error {
    background: #ffebee;
    border: 1px solid #ff6b6b;
    color: #d32f2f;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.error ul {
    margin: 0;
    padding-left: 20px;
}

.confirm-data {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.confirm-data dl {
    margin: 0;
}

.confirm-data dt {
    font-weight: bold;
    color: #333;
    margin-top: 15px;
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 1px dotted #ccc;
}

.confirm-data dt:first-child {
    margin-top: 0;
}

.confirm-data dd {
    margin: 0 0 10px 0;
    padding: 5px 0;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group textarea {
        max-width: 100%;
    }
    
    .submit-btn, .back-btn {
        display: block;
        width: 100%;
        margin: 5px 0;
    }
}

@media (max-width: 480px) {
    .form-group {
        margin-bottom: 1em;
    }
    
    .form-group label {
        font-size: 13px;
    }
    
    .submit-btn, .back-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}
