/*
Theme Name: Iheya Recruitment Theme
Theme URI: https://example.com
Author: Antigravity
Author URI: https://example.com
Description: WordPress theme for Iheya Village recruitment.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: iheya-theme
*/

/* Contact Form 7 Custom Styles (Scoped) */
.iheya-contact-form .form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .iheya-contact-form .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.iheya-contact-form .form-item {
    margin-bottom: 2rem;
}

.iheya-contact-form .form-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151; /* gray-700 */
    margin-bottom: 0.5rem;
}

@media (prefers-color-scheme: dark) {
    .iheya-contact-form .form-label {
        color: #d1d5db; /* gray-300 */
    }
}

.iheya-contact-form .badge-required {
    font-size: 0.625rem;
    font-weight: 700;
    color: #ef4444; /* red-500 */
    background-color: #fef2f2; /* red-50 */
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    border: 1px solid #fee2e2; /* red-100 */
}

@media (prefers-color-scheme: dark) {
    .iheya-contact-form .badge-required {
        background-color: rgba(127, 29, 29, 0.3); /* red-900/30 */
        border-color: #991b1b; /* red-800 */
    }
}

.iheya-contact-form .form-submit-button {
    position: relative;
    overflow: hidden;
    background: linear-gradient(to right, #0ea5e9, #0284c7); /* primary to primary-dark */
    color: white;
    font-weight: 700;
    padding: 1.25rem 3rem;
    border-radius: 9999px;
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.4);
    transition: all 0.3s ease;
    width: 100%;
    font-size: 1.125rem;
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
    display: flex; /* Added */
    justify-content: center; /* Added */
    align-items: center; /* Added */
    appearance: none; /* Added */
    -webkit-appearance: none; /* Added */
}

.iheya-contact-form .badge-optional {
    font-size: 0.625rem;
    font-weight: 700;
    color: #6b7280; /* gray-500 */
    background-color: #f3f4f6; /* gray-100 */
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    border: 1px solid #e5e7eb; /* gray-200 */
}

@media (prefers-color-scheme: dark) {
    .iheya-contact-form .badge-optional {
        background-color: #374151; /* gray-700 */
        border-color: #4b5563; /* gray-600 */
    }
}

.iheya-contact-form .form-input,
.iheya-contact-form .form-textarea {
    width: 100%;
    border-radius: 0.75rem; /* rounded-xl */
    border: 1px solid #e5e7eb; /* gray-200 */
    background-color: rgba(255, 255, 255, 0.5);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
    .iheya-contact-form .form-input,
    .iheya-contact-form .form-textarea {
        background-color: rgba(55, 65, 81, 0.5); /* gray-700/50 */
        border-color: #4b5563; /* gray-600 */
        color: white;
    }
}

.iheya-contact-form .form-input:focus,
.iheya-contact-form .form-textarea:focus {
    background-color: white;
    border-color: #0ea5e9; /* primary */
    outline: none;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

@media (prefers-color-scheme: dark) {
    .iheya-contact-form .form-input:focus,
    .iheya-contact-form .form-textarea:focus {
        background-color: #374151; /* gray-700 */
    }
}

.iheya-contact-form .form-textarea {
    height: 8rem;
    resize: none;
}

/* Radio Button Styling */
.iheya-contact-form .wpcf7-radio {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
}

.iheya-contact-form .wpcf7-list-item {
    margin: 0 !important;
    display: flex !important;
    flex: 1;
}

.iheya-contact-form .wpcf7-list-item > label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem;
    background-color: #fff;
    border: 2px solid #e5e7eb; /* gray-200 */
    border-radius: 0.75rem; /* rounded-xl */
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.iheya-contact-form .wpcf7-list-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.iheya-contact-form .wpcf7-list-item > label:has(input:checked) {
    background-color: #f0f9ff; /* blue-50 */
    border-color: #0ea5e9; /* primary */
}

.iheya-contact-form .wpcf7-list-item-label {
    margin-left: 0;
    font-weight: bold;
    font-size: 1rem;
    color: #4b5563; /* gray-600 */
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.iheya-contact-form .wpcf7-list-item-label::before {
    content: '';
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid #9ca3af; /* gray-400 */
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.iheya-contact-form .wpcf7-list-item > label:has(input:checked) .wpcf7-list-item-label::before {
    border-color: #0ea5e9;
    background-color: #0ea5e9;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='24px' height='24px'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-size: 80%;
    background-position: center;
    background-repeat: no-repeat;
}

.iheya-contact-form .wpcf7-list-item > label:hover {
    border-color: #bae6fd; /* blue-200 */
}

.wpcf7-submit {
    width: 100%;
}

@media (min-width: 768px) {
  .wpcf7-submit {
    width: auto;
  }
}

/* Error validation styling */
.wpcf7-not-valid-tip {
  font-size: 0.75rem;
  color: #ef4444; /* red-500 */
  margin-top: 0.25rem;
}
