/* ============================================================
 * HOMMY PLATFORM - Frontend CSS
 * Colori Brand: Arancione #FF6B35 / Scuro #2D3436 / Light #F8F9FA
 * ============================================================ */

:root {
    --hmy-primary: #FF6B35;
    --hmy-primary-dark: #E55A2B;
    --hmy-primary-light: #FF8F65;
    --hmy-secondary: #2D3436;
    --hmy-success: #28a745;
    --hmy-warning: #ffc107;
    --hmy-danger: #dc3545;
    --hmy-light: #F8F9FA;
    --hmy-border: #dee2e6;
    --hmy-text: #333;
    --hmy-text-muted: #6c757d;
    --hmy-radius: 12px;
    --hmy-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --hmy-shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
}

/* ---------- REGISTRATION FORM ---------- */

.hmy-registration-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.hmy-registration-wrap h2 {
    text-align: center;
    color: var(--hmy-secondary);
    margin-bottom: 10px;
    font-size: 28px;
}

.hmy-registration-wrap .hmy-subtitle {
    text-align: center;
    color: var(--hmy-text-muted);
    margin-bottom: 30px;
    font-size: 16px;
}

/* Step Indicator */
.hmy-steps-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
}

.hmy-step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--hmy-border);
    transition: all 0.3s;
}

.hmy-step-dot.active {
    background: var(--hmy-primary);
    transform: scale(1.2);
}

.hmy-step-dot.completed {
    background: var(--hmy-success);
}

/* Form Sections */
.hmy-form-section {
    background: #fff;
    border: 1px solid var(--hmy-border);
    border-radius: var(--hmy-radius);
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--hmy-shadow);
}

.hmy-form-section h3 {
    color: var(--hmy-primary);
    font-size: 18px;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--hmy-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.hmy-form-section h3 i {
    font-size: 20px;
}

/* Form Fields */
.hmy-field-row {
    margin-bottom: 18px;
}

.hmy-field-row label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--hmy-secondary);
    font-size: 14px;
}

.hmy-field-row label .required {
    color: var(--hmy-danger);
    margin-left: 2px;
}

.hmy-field-row input[type="text"],
.hmy-field-row input[type="email"],
.hmy-field-row input[type="tel"],
.hmy-field-row input[type="password"],
.hmy-field-row input[type="number"],
.hmy-field-row select,
.hmy-field-row textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--hmy-border);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
    box-sizing: border-box;
}

.hmy-field-row input:focus,
.hmy-field-row select:focus,
.hmy-field-row textarea:focus {
    border-color: var(--hmy-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
    outline: none;
}

/* Role Toggle Buttons */
.hmy-role-toggles {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hmy-role-toggle {
    flex: 1;
    min-width: 180px;
    padding: 16px;
    border: 2px solid var(--hmy-border);
    border-radius: var(--hmy-radius);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fff;
}

.hmy-role-toggle:hover {
    border-color: var(--hmy-primary-light);
    box-shadow: var(--hmy-shadow-hover);
}

.hmy-role-toggle.selected {
    border-color: var(--hmy-primary);
    background: rgba(255, 107, 53, 0.05);
}

.hmy-role-toggle i {
    font-size: 32px;
    color: var(--hmy-primary);
    display: block;
    margin-bottom: 8px;
}

.hmy-role-toggle .role-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--hmy-secondary);
}

.hmy-role-toggle .role-desc {
    font-size: 13px;
    color: var(--hmy-text-muted);
    margin-top: 4px;
}

/* Two Column Row */
.hmy-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .hmy-two-col {
        grid-template-columns: 1fr;
    }
    .hmy-role-toggle {
        min-width: 140px;
    }
}

/* Working Hours Grid */
.hmy-hours-grid {
    display: grid;
    gap: 8px;
}

.hmy-hours-row {
    display: grid;
    grid-template-columns: 100px 1fr 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--hmy-light);
    border-radius: 8px;
}

.hmy-hours-row .day-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--hmy-secondary);
}

.hmy-hours-row input[type="time"] {
    padding: 8px 10px;
    border: 1px solid var(--hmy-border);
    border-radius: 6px;
    font-size: 14px;
}

.hmy-hours-row .hmy-toggle-day {
    width: 20px;
    height: 20px;
    accent-color: var(--hmy-primary);
}

/* Cleaner-specific Fields */
.hmy-cleaner-fields {
    display: none;
}

.hmy-cleaner-fields.visible {
    display: block;
}

.hmy-service-types {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hmy-service-types label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--hmy-border);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: normal;
    font-size: 14px;
}

.hmy-service-types label:hover {
    border-color: var(--hmy-primary-light);
}

.hmy-service-types input:checked + span {
    color: var(--hmy-primary);
    font-weight: 600;
}

.hmy-service-types input {
    accent-color: var(--hmy-primary);
}

/* Buttons */
.hmy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.hmy-btn-primary {
    background: var(--hmy-primary);
    color: #fff;
}

.hmy-btn-primary:hover {
    background: var(--hmy-primary-dark);
    box-shadow: var(--hmy-shadow-hover);
}

.hmy-btn-secondary {
    background: var(--hmy-light);
    color: var(--hmy-secondary);
    border: 1px solid var(--hmy-border);
}

.hmy-btn-secondary:hover {
    background: #e9ecef;
}

.hmy-btn-full {
    width: 100%;
}

.hmy-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form Actions */
.hmy-form-actions {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 20px;
}

/* ---------- SEARCH FORM ---------- */

.hmy-search-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.hmy-search-box {
    background: #fff;
    border-radius: var(--hmy-radius);
    padding: 25px;
    box-shadow: var(--hmy-shadow);
    margin-bottom: 20px;
}

.hmy-search-box h3 {
    color: var(--hmy-secondary);
    margin: 0 0 20px 0;
    font-size: 20px;
}

.hmy-search-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.hmy-search-filters label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--hmy-text-muted);
    margin-bottom: 5px;
}

.hmy-search-filters select,
.hmy-search-filters input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--hmy-border);
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

.hmy-search-actions {
    display: flex;
    gap: 10px;
}

/* ---------- SEARCH RESULTS ---------- */

.hmy-results-list {
    display: grid;
    gap: 16px;
}

.hmy-provider-card {
    display: flex;
    gap: 20px;
    background: #fff;
    border-radius: var(--hmy-radius);
    padding: 20px;
    box-shadow: var(--hmy-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid var(--hmy-primary);
}

.hmy-provider-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hmy-shadow-hover);
}

.hmy-provider-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--hmy-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hmy-provider-avatar i {
    font-size: 32px;
    color: var(--hmy-primary);
}

.hmy-provider-info {
    flex: 1;
}

.hmy-provider-info h4 {
    margin: 0 0 6px 0;
    font-size: 18px;
    color: var(--hmy-secondary);
}

.hmy-provider-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--hmy-text-muted);
}

.hmy-provider-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.hmy-provider-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.hmy-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.hmy-badge-transport {
    background: rgba(255, 107, 53, 0.1);
    color: var(--hmy-primary);
}

.hmy-badge-cleaner {
    background: rgba(40, 167, 69, 0.1);
    color: var(--hmy-success);
}

.hmy-badge-verified {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

.hmy-provider-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    align-items: flex-start;
}

@media (max-width: 600px) {
    .hmy-provider-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .hmy-provider-meta {
        justify-content: center;
    }
    .hmy-provider-badges {
        justify-content: center;
    }
    .hmy-provider-actions {
        justify-content: center;
    }
}

/* ---------- PRICING CALCULATOR ---------- */

.hmy-calculator-widget {
    background: #fff;
    border-radius: var(--hmy-radius);
    padding: 25px;
    box-shadow: var(--hmy-shadow);
    border-top: 4px solid var(--hmy-primary);
}

.hmy-calculator-widget h3 {
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hmy-calc-result {
    background: var(--hmy-light);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-top: 20px;
}

.hmy-calc-price {
    font-size: 36px;
    font-weight: 800;
    color: var(--hmy-primary);
}

.hmy-calc-label {
    font-size: 14px;
    color: var(--hmy-text-muted);
    margin-top: 4px;
}

/* ---------- NOTICES ---------- */

.hmy-notice {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.hmy-notice-success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.2);
    color: #155724;
}

.hmy-notice-error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: #721c24;
}

.hmy-notice-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.2);
    color: #856404;
}

/* ---------- LOADING ---------- */

.hmy-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: var(--hmy-text-muted);
}

.hmy-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--hmy-border);
    border-top-color: var(--hmy-primary);
    border-radius: 50%;
    animation: hmy-spin 0.8s linear infinite;
}

@keyframes hmy-spin {
    to { transform: rotate(360deg); }
}

/* ---------- PROVINCE SELECT ---------- */

.hmy-province-wrapper {
    position: relative;
}

.hmy-province-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23333' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 36px;
}

/* ---------- GOOGLE PLACES AUTOCOMPLETE FIX ---------- */
.pac-container {
    z-index: 999999 !important;
    border-radius: 8px;
    box-shadow: var(--hmy-shadow-hover);
    border: 1px solid var(--hmy-border);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pac-item {
    padding: 10px 14px;
    font-size: 14px;
}

.pac-item:hover {
    background: var(--hmy-light);
}
