/* HeimishTech Connect - Main Stylesheet */

:root {
    --primary: #000000;
    --accent: #44D62C;
    --background: #FFFFFF;
    --text: #000000;
    --text-light: #666666;
    --border: #E0E0E0;
    --error: #E53935;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background);
    color: var(--text);
    direction: rtl;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: var(--background);
    padding: 20px 0;
    border-bottom: 2px solid var(--primary);
    margin-bottom: 30px;
}

.header .logo {
    max-height: 50px;
}

.header h1 {
    font-size: 1.8rem;
    color: var(--primary);
}

/* Progress Bar */
.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--border);
    z-index: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.progress-step .step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: var(--primary);
    color: var(--background);
}

.progress-step.completed .step-number {
    background: var(--accent);
    color: var(--background);
}

.progress-step .step-label {
    font-size: 0.85rem;
    color: var(--text-light);
}

.progress-step.active .step-label {
    color: var(--primary);
    font-weight: bold;
}

/* Form Steps */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Service Type Selection (Step 1) */
.service-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.service-type-card {
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.service-type-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.service-type-card.selected {
    border-color: var(--accent);
    background: rgba(68, 214, 44, 0.05);
}

.service-type-card .icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.service-type-card h3 {
    font-size: 1.2rem;
    color: var(--primary);
}

/* Package Grid (Step 2) */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background: #F5F5F5;
    border-radius: 8px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-weight: 500;
    color: var(--text-light);
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--background);
    cursor: pointer;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.package-card {
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.package-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.package-card.selected {
    border-color: var(--accent);
    background: rgba(68, 214, 44, 0.05);
}

.package-card .badge-5g,
.package-card .badge-kosher {
    position: absolute;
    top: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

.package-card .badge-5g {
    right: 10px;
    background: var(--primary);
    color: var(--background);
}

.package-card .badge-kosher {
    left: 10px;
    background: var(--accent);
    color: var(--background);
}

.package-card .package-quota {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 10px;
}

.package-card .company-name {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 8px;
    margin-top: 25px;
}

.package-card .company-logo {
    height: 40px;
    object-fit: contain;
    margin-bottom: 15px;
}

.package-card .package-name {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--primary);
}

.package-card .package-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 5px;
}

.package-card .package-price span {
    font-size: 0.9rem;
    font-weight: normal;
    color: var(--text-light);
}

.package-card .package-note {
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 15px;
}

/* Package Specs - like ideali.co.il */
.package-specs {
    margin: 15px 0;
    padding: 10px 0;
    border-top: 1px solid var(--border);
}

.package-specs .spec-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.package-specs .spec-icon {
    font-size: 0.85rem;
    min-width: 20px;
    text-align: center;
}

.package-specs .spec-value {
    flex: 1;
}

.package-card .package-details-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: right;
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

.package-card .package-details-list li {
    padding: 3px 0;
    padding-right: 15px;
    position: relative;
}

.package-card .package-details-list li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--accent);
    font-size: 0.75rem;
}

.package-card .package-description {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border: 2px solid var(--primary);
    background: var(--background);
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: var(--primary);
    color: var(--background);
}

.quantity-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.quantity-value {
    font-size: 1.2rem;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

/* Cart Summary */
.cart-summary {
    background: #F5F5F5;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.cart-summary h3 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid var(--primary);
    font-size: 1.2rem;
    font-weight: bold;
}

/* Form Fields */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary);
}

.form-group label .required {
    color: var(--error);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group input.error,
.form-group select.error {
    border-color: var(--error);
}

.form-group .error-message {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 5px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* Radio Options (SIM Type) */
.radio-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-option:hover {
    border-color: var(--accent);
}

.radio-option.selected {
    border-color: var(--accent);
    background: rgba(68, 214, 44, 0.05);
}

.radio-option input {
    display: none;
}

.radio-option .radio-circle {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 50%;
    margin-left: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.radio-option.selected .radio-circle {
    border-color: var(--accent);
}

.radio-option.selected .radio-circle::after {
    content: '';
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
}

.radio-option .radio-label {
    flex: 1;
}

.radio-option .radio-label h4 {
    margin-bottom: 3px;
}

.radio-option .radio-label p {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Buttons */
.btn {
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: var(--background);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--background);
}

.btn-accent {
    background: var(--accent);
    color: var(--background);
}

.btn-accent:hover {
    opacity: 0.9;
}

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

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Success Screen */
.success-screen {
    text-align: center;
    padding: 60px 20px;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.success-icon svg {
    width: 50px;
    height: 50px;
    fill: var(--background);
}

.success-screen h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.success-screen .order-number {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.success-details {
    background: #F5F5F5;
    border-radius: 12px;
    padding: 25px;
    max-width: 500px;
    margin: 0 auto;
    text-align: right;
}

/* Loading Spinner */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .service-types {
        grid-template-columns: repeat(2, 1fr);
    }

    .packages-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .filters-bar {
        flex-direction: column;
    }

    .progress-step .step-label {
        display: none;
    }

    .form-actions {
        flex-direction: column;
        gap: 10px;
    }

    .form-actions .btn {
        width: 100%;
    }
}

/* Hot Badge */
.hot-badge {
    position: absolute;
    top: -10px;
    right: 15px;
    background: var(--accent);
    color: var(--background);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Floating Cart Panel */
.floating-cart {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 350px;
    max-height: 80vh;
    background: var(--background);
    border: 2px solid var(--border);
    border-left: none;
    border-radius: 0 16px 16px 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.floating-cart.collapsed {
    transform: translateY(-50%) translateX(-300px);
}

.floating-cart.collapsed .toggle-icon {
    transform: rotate(180deg);
}

.floating-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--primary);
    color: var(--background);
    border-radius: 0 14px 0 0;
}

.floating-cart-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.floating-cart-toggle {
    background: none;
    border: none;
    color: var(--background);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-icon {
    transition: transform 0.3s ease;
    display: inline-block;
}

.floating-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    max-height: calc(80vh - 130px);
}

.floating-cart-empty {
    text-align: center;
    padding: 30px;
    color: var(--text-light);
}

.floating-cart-footer {
    padding: 15px 20px;
    border-top: 2px solid var(--border);
    background: #F5F5F5;
    border-radius: 0 0 14px 0;
}

.floating-cart-footer .cart-total {
    margin: 0;
    padding: 0;
    border: none;
}

/* Cart Item in Floating Panel */
.floating-cart-item {
    background: #F9F9F9;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 12px;
}

.floating-cart-item:last-child {
    margin-bottom: 0;
}

.floating-cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.floating-cart-item-info h4 {
    font-size: 0.95rem;
    margin-bottom: 3px;
    color: var(--primary);
}

.floating-cart-item-info .item-price {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
}

.floating-cart-item-remove {
    background: none;
    border: none;
    color: var(--error);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.floating-cart-item-remove:hover {
    opacity: 0.7;
}

/* Line Number Badge */
.line-number-badge {
    display: inline-block;
    background: var(--primary);
    color: var(--background);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    text-align: center;
    line-height: 22px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 8px;
}

/* SIM Options in Floating Cart */
.floating-cart-sim-options {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
}

.floating-cart-sim-options label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.sim-type-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.sim-number-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    display: none;
}

.sim-number-input.visible {
    display: block;
}

.sim-number-input::placeholder {
    color: #999;
}

/* Porting Options */
.porting-options {
    margin-top: 8px;
}

.porting-options label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.porting-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.porting-number-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    display: none;
}

.porting-number-input.visible {
    display: block;
}

/* Mobile Floating Cart */
@media (max-width: 768px) {
    .floating-cart {
        width: 100%;
        max-width: 100%;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
        border-radius: 16px 16px 0 0;
        border: 2px solid var(--border);
        border-bottom: none;
        max-height: 60vh;
    }

    .floating-cart.collapsed {
        transform: translateY(calc(100% - 60px));
    }

    .floating-cart-header {
        border-radius: 14px 14px 0 0;
    }

    .floating-cart-footer {
        border-radius: 0;
    }

    .toggle-icon {
        transform: rotate(90deg);
    }

    .floating-cart.collapsed .toggle-icon {
        transform: rotate(-90deg);
    }
}
