/* Registration Wizard Styles */

.register-wizard-section {
    position: relative;
    padding: 120px 0 120px;
    background-color: var(--thm-gray-bg);
}

.register-wizard-container {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    padding: 40px 48px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

/* Step Indicator */
.wizard-steps-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 50px;
    position: relative;
}

.wizard-steps-indicator::before {
    content: "";
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    height: 2px;
    background: #ebebeb;
    z-index: 1;
}

.step-item {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.step-number {
    width: 50px;
    height: 50px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: 700;
    color: #bbb;
    transition: all 0.3s ease;
    font-size: 15px;
}

.step-item.active .step-number {
    background: var(--thm-primary-color);
    border-color: var(--thm-primary-color);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(var(--thm-primary-color-rgb), 0.18);
}

.step-item.completed .step-number {
    background: #51b155;
    border-color: #51b155;
    color: #fff;
}

.step-label {
    font-size: 12px;
    font-weight: 600;
    color: #aaa;
    margin-top: 6px;
    display: block;
    letter-spacing: 0.2px;
}

.step-item.active .step-label {
    color: var(--thm-black);
}

.step-item.completed .step-label {
    color: #51b155;
}

/* Form Sections */
.register-step-content {
    animation: fadeIn 0.4s ease;
    padding: 10px 0;
}

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

.form-field-group {
    margin-bottom: 22px;
}

.form-field-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #2c2c2c;
    font-size: 14px;
    letter-spacing: 0.1px;
}

.form-control-custom {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e2e2e2;
    border-radius: 8px;
    font-size: 14.5px;
    color: #333;
    background-color: #fafaf8;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    appearance: none;
    -webkit-appearance: none;
}

.form-control-custom:focus {
    border-color: var(--thm-primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--thm-primary-color-rgb), 0.12);
    background-color: #fff;
}

.form-control-custom::placeholder {
    color: #c0c0bb;
    font-size: 14px;
}

textarea.form-control-custom {
    resize: vertical;
    min-height: 90px;
}

select.form-control-custom {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23888' d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    padding-right: 36px;
    cursor: pointer;
}

/* Navigation Buttons */
.wizard-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1.5px solid #f0f0f0;
}

.wizard-navigation .btn-back {
    background: transparent;
    border: 1.5px solid #d0d0d0;
    color: #555;
    padding: 9px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wizard-navigation .btn-back:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

/* Farm Cards */
.farm-cards-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.farm-card {
    border: 1.5px solid #e8e8e8;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.farm-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}

.farm-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #f8f8f6;
    border-bottom: 1.5px solid #efefef;
    cursor: pointer;
    user-select: none;
}

.farm-card-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.farm-card-index {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--thm-primary-color);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.farm-card-title {
    font-weight: 700;
    font-size: 15px;
    color: #2c2c2c;
}

.farm-card-subtitle {
    font-size: 12px;
    color: #888;
    margin-top: 1px;
}

.farm-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-remove-farm {
    background: transparent;
    border: none;
    color: #e74c3c;
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    line-height: 1;
    transition: background 0.15s;
}

.btn-remove-farm:hover {
    background: #ffeaea;
}

.farm-card-body {
    padding: 24px 20px 10px;
}

/* Add Farm Button */
.btn-add-farm {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    background: var(--thm-primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.1s ease;
}

.btn-add-farm:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

/* Step 3 header with Add Farm button */
.step3-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.step3-header h6 {
    font-size: 16px;
    font-weight: 700;
    color: #2c2c2c;
    margin: 0;
}

/* Location row */
.location-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f5f5f2;
    border-radius: 10px;
    border: 1.5px solid #ebebeb;
    margin-bottom: 16px;
}

.location-row-label {
    font-weight: 700;
    font-size: 14px;
    color: #333;
}

.location-badge {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
}

.btn-get-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: var(--thm-primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.btn-get-location:hover {
    opacity: 0.88;
}

/* Farm empty state */
.farm-empty-state {
    text-align: center;
    padding: 48px 24px;
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    color: #aaa;
}

.farm-empty-state i {
    font-size: 36px;
    margin-bottom: 12px;
    display: block;
    color: #ccc;
}

.farm-empty-state p {
    margin-bottom: 18px;
    font-size: 15px;
}

/* Declaration Section */
.declaration-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.declaration-item:hover {
    background: #f0f0f0;
}

.declaration-item input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
}

/* Field validation error states */
.form-field-group.has-error .form-control-custom {
    border-color: #e74c3c;
    background-color: #fff8f8;
}

.form-field-group.has-error .form-control-custom:focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.12);
}

.field-error-msg {
    margin-top: 5px;
    font-size: 12.5px;
    color: #e74c3c;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Step error summary banner */
.step-error-banner {
    background: #fff0ef;
    border: 1.5px solid #f5c6c2;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 13.5px;
    color: #c0392b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: shakeX 0.4s ease;
}

@keyframes shakeX {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}



/* ─── Date Picker (react-datepicker) ─── */
.datepicker-wrapper {
    position: relative;
    width: 100%;
}
.datepicker-wrapper .react-datepicker-wrapper {
    width: 100%;
}
.datepicker-wrapper .calendar-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    pointer-events: none;
    font-size: 14px;
    z-index: 1;
}
.datepicker-wrapper .react-datepicker__close-icon {
    right: 35px;
    padding: 0;
}
.datepicker-wrapper .react-datepicker__close-icon::after {
    background-color: #ccc;
    color: #fff;
    font-size: 12px;
    height: 16px;
    width: 16px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Custom calendar styling to match the wizard */
.custom-calendar {
    font-family: inherit !important;
    border: 1.5px solid #e2e2e2 !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
    padding: 8px !important;
    background-color: #fff !important;
}
.custom-calendar .react-datepicker__header {
    background-color: #fff !important;
    border-bottom: 1px solid #f0f0f0 !important;
    padding-top: 10px !important;
}
.custom-calendar .react-datepicker__current-month {
    font-weight: 700 !important;
    color: #2c2c2c !important;
}
.custom-calendar .react-datepicker__day-name {
    color: #aaa !important;
    font-weight: 700 !important;
    font-size: 11px !important;
}
.custom-calendar .react-datepicker__day--selected {
    background-color: var(--thm-primary-color) !important;
    border-radius: 50% !important;
    color: #fff !important;
}
.custom-calendar .react-datepicker__day--today {
    color: var(--thm-primary-color) !important;
    font-weight: 800 !important;
}
.custom-calendar .react-datepicker__navigation {
    top: 15px !important;
}
.custom-calendar .react-datepicker__day:hover {
    border-radius: 50% !important;
}


/* Override browser autofill styles to match theme */
.form-control-custom:-webkit-autofill,
.form-control-custom:-webkit-autofill:hover, 
.form-control-custom:-webkit-autofill:focus, 
.form-control-custom:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #f4fbf4 inset !important;
    -webkit-text-fill-color: #2c2c2c !important;
    border-color: var(--thm-primary-color) !important;
    transition: background-color 5000s ease-in-out 0s;
}
