/* NZ Custom Form - Frontend Styles */
.nzcf-form-wrapper {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (max-width: 768px) {
    .nzcf-form-wrapper {
        max-width: 100%;
        margin: 20px 0;
        padding: 0 10px;
    }
}

.nzcf-form-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.nzcf-form-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 40px;
    text-align: center;
}

.nzcf-form-title {
    font-size: 42px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 16px 0;
    letter-spacing: -0.5px;
}

.nzcf-form-description {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.7;
}

.nzcf-form-body {
    padding: 50px 40px;
}

.nzcf-field {
    margin-bottom: 35px;
}

.nzcf-main-label {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 14px;
    line-height: 1.5;
}

.nzcf-main-label .required {
    color: #e53e3e;
    margin-left: 4px;
}

.nzcf-input,
.nzcf-textarea,
.nzcf-select {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    color: #2d3748;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    transition: all 0.3s ease;
}

.nzcf-input:focus,
.nzcf-textarea:focus,
.nzcf-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.nzcf-textarea {
    min-height: 140px;
    resize: vertical;
}

.nzcf-choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nzcf-choice-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f7fafc;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nzcf-choice-item:hover {
    background: #edf2f7;
    border-color: #e2e8f0;
}

.nzcf-choice-item input[type="checkbox"],
.nzcf-choice-item input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    flex-shrink: 0;
    cursor: pointer;
}

.nzcf-choice-label {
    font-size: 16px;
    font-weight: 500;
    color: #2d3748;
    margin: 0;
    cursor: pointer;
    line-height: 1.4;
    flex: 1;
}

.nzcf-help-text {
    font-size: 14px;
    color: #718096;
    margin-top: 8px;
    margin-bottom: 0;
}

.nzcf-file-upload {
    margin-bottom: 10px;
}

.nzcf-file-drop-area {
    border: 3px dashed #cbd5e0;
    border-radius: 16px;
    padding: 50px 30px;
    text-align: center;
    background: #f7fafc;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.nzcf-file-drop-area:hover {
    border-color: #667eea;
    background: #edf2f7;
}

.nzcf-file-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.nzcf-file-text {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.nzcf-file-hint {
    font-size: 14px;
    color: #718096;
}

.nzcf-file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
}

.nzcf-file-selected {
    margin-top: 16px;
    padding: 12px 16px;
    background: #e6fffa;
    border: 1px solid #81e6d9;
    border-radius: 8px;
    font-size: 14px;
    color: #234e52;
}

.nzcf-file-selected::before {
    content: '✓';
    margin-right: 8px;
    color: #38b2ac;
    font-weight: bold;
}

.nzcf-terms-wrapper {
    margin-bottom: 10px;
}

.nzcf-terms-box {
    max-height: 300px;
    overflow-y: auto;
    padding: 20px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.8;
    color: #2d3748;
    margin-bottom: 15px;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 768px) {
    .nzcf-terms-box {
        font-size: 13px;
        line-height: 1.7;
        padding: 15px;
        max-height: 250px;
    }
}

.nzcf-terms-box::-webkit-scrollbar {
    width: 8px;
}

.nzcf-terms-box::-webkit-scrollbar-track {
    background: #edf2f7;
    border-radius: 10px;
}

.nzcf-terms-box::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
}

.nzcf-terms-box::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.nzcf-terms-status {
    padding: 10px 15px;
    background: #fff5f5;
    border: 1px solid #fc8181;
    border-radius: 8px;
    color: #742a2a;
    font-size: 14px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 600;
}

.nzcf-terms-status.completed {
    background: #e6fffa;
    border-color: #81e6d9;
    color: #234e52;
}

.nzcf-terms-agree {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
}

.nzcf-terms-agree input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
}

.nzcf-terms-agree input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.nzcf-terms-agree .nzcf-choice-label {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    cursor: pointer;
}

.nzcf-submit-wrapper {
    margin-top: 40px;
}

.nzcf-submit-btn {
    width: 100%;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.nzcf-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

.nzcf-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.nzcf-message.success {
    background: #e6fffa;
    border: 1px solid #81e6d9;
    color: #234e52;
}

.nzcf-message.error {
    background: #fff5f5;
    border: 1px solid #fc8181;
    color: #742a2a;
}

/* エラー表示スタイル */
.nzcf-error-header {
    font-size: 16px;
    font-weight: 700;
    color: #c53030;
    margin-bottom: 12px;
}

.nzcf-error-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.nzcf-error-list li {
    padding: 8px 0;
    border-bottom: 1px solid #fed7d7;
    color: #742a2a;
    font-size: 14px;
}

.nzcf-error-list li:last-child {
    border-bottom: none;
}

.nzcf-error-list li::before {
    content: '⚠️';
    margin-right: 8px;
}

/* エラー状態のフィールド */
.nzcf-field.has-error .nzcf-input,
.nzcf-field.has-error .nzcf-textarea,
.nzcf-field.has-error .nzcf-select {
    border-color: #fc8181;
    background: #fff5f5;
}

.nzcf-field.has-error .nzcf-input:focus,
.nzcf-field.has-error .nzcf-textarea:focus,
.nzcf-field.has-error .nzcf-select:focus {
    border-color: #f56565;
    box-shadow: 0 0 0 4px rgba(245, 101, 101, 0.1);
}

.nzcf-field.has-error .nzcf-file-drop-area {
    border-color: #fc8181;
    background: #fff5f5;
}

.nzcf-field.has-error .nzcf-terms-agree {
    border-color: #fc8181;
    background: #fff5f5;
}

.nzcf-field.has-error .nzcf-main-label {
    color: #c53030;
}

/* ===== 日付選択UI（月/日プルダウン） ===== */
.nzcf-rental-date-field {
    margin-bottom: 30px;
}

.nzcf-year-display {
    position: absolute;
    top: -35px;
    left: 0;
    background: #fff;
    padding: 8px 20px;
    border: 2px solid #667eea;
    border-radius: 8px 8px 0 0;
    font-weight: 700;
    color: #667eea;
    z-index: 10;
    font-size: 16px;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
}

.nzcf-date-selector {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    position: relative;
}

.nzcf-select-wrapper {
    flex: 1;
    position: relative;
}

.nzcf-sub-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2d3748;
}

.nzcf-month-select,
.nzcf-day-select {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    color: #2d3748;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232d3748' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 45px;
}

.nzcf-month-select:hover,
.nzcf-day-select:not(:disabled):hover {
    border-color: #667eea;
}

.nzcf-month-select:focus,
.nzcf-day-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.nzcf-day-select:disabled {
    background-color: #f7fafc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 予約状況メッセージ */
.nzcf-date-status {
    margin-top: 15px;
    padding: 14px 18px;
    background: #e6fffa;
    border: 2px solid #81e6d9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

.nzcf-date-status .status-icon {
    font-size: 20px;
    color: #38b2ac;
}

.nzcf-date-status .status-text {
    font-size: 15px;
    font-weight: 600;
    color: #234e52;
    flex: 1;
}

/* エラーメッセージ */
.nzcf-date-error {
    margin-top: 15px;
    padding: 14px 18px;
    background: #fff5f5;
    border: 2px solid #fc8181;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

.nzcf-date-error .error-icon {
    font-size: 20px;
    color: #e53e3e;
}

.nzcf-date-error .error-text {
    font-size: 14px;
    font-weight: 600;
    color: #742a2a;
    flex: 1;
    line-height: 1.6;
}

/* フォーム送信時に日付エラーを非表示 */
.nzcf-form.nzcf-hide-inline-date-error .nzcf-date-error {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .nzcf-form-wrapper {
        max-width: 100%;
        margin: 20px 0;
        padding: 0 10px;
    }
    .nzcf-form-header {
        padding: 40px 20px;
    }
    .nzcf-form-title {
        font-size: 28px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    .nzcf-form-body {
        padding: 30px 20px;
    }
    .nzcf-main-label {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    .nzcf-choice-label {
        word-wrap: break-word;
        overflow-wrap: break-word;
        font-size: 15px;
    }
    .nzcf-help-text {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    .nzcf-terms-status {
        word-wrap: break-word;
        overflow-wrap: break-word;
        font-size: 13px;
    }
    .nzcf-date-selector {
        flex-direction: column;
        gap: 15px;
    }
    
    .nzcf-year-display {
        top: -30px;
        padding: 6px 15px;
        font-size: 14px;
    }
    
    .nzcf-date-status .status-text,
    .nzcf-date-error .error-text {
        font-size: 14px;
    }
}