/* Link Generator Styles */

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

/* Override body styles for sidebar layout */
.app-container .main-content {
    flex: 1;
    margin-left: 240px;
    padding: 20px;
    background: #f2f2f7;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.app-container.sidebar-collapsed .main-content {
    margin-left: 60px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .app-container .main-content {
        margin-left: 0;
        padding: 10px;
    }
    
    .app-container.sidebar-collapsed .main-content {
        margin-left: 0;
    }
}

.link-generator-container {
    background: #f2f2f7;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 24px 30px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.header-text h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-text p {
    color: #86868b;
    font-size: 16px;
    margin: 0;
}

/* Main Content */
.main-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

/* Step Container */
.step-container {
    display: none;
    padding: 30px;
    min-height: 500px;
}

.step-container.active {
    display: block;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.step-title h2 {
    margin: 0 0 4px 0;
    color: #1d1d1f;
    font-size: 24px;
    font-weight: 700;
}

.step-title p {
    margin: 0;
    color: #86868b;
    font-size: 16px;
    font-weight: 400;
}

/* Search Container */
.search-container {
    margin-bottom: 24px;
}

.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #86868b;
    font-size: 16px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 2px solid rgba(0, 122, 255, 0.1);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 400;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    color: #1d1d1f;
}

.search-box input:focus {
    outline: none;
    border-color: #007AFF;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.search-box input::placeholder {
    color: #86868b;
}

/* Customers List */
.customers-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.customer-item {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 16px;
}

.customer-item:hover {
    background: rgba(0, 122, 255, 0.05);
    border-left: 4px solid #007AFF;
}

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

.customer-item.selected {
    background: rgba(0, 122, 255, 0.1);
    border-left: 4px solid #007AFF;
}

.customer-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.customer-info h3 {
    margin: 0 0 4px 0;
    color: #1d1d1f;
    font-size: 16px;
    font-weight: 600;
}

.customer-info p {
    margin: 0;
    color: #86868b;
    font-size: 14px;
    font-weight: 400;
}

.customer-meta {
    margin-left: auto;
    text-align: right;
    color: #86868b;
    font-size: 12px;
    font-weight: 500;
}

/* Selected Customer */
.selected-customer {
    background: rgba(0, 122, 255, 0.1);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 2px solid #007AFF;
}

.selected-customer h3 {
    margin: 0 0 8px 0;
    color: #1d1d1f;
    font-size: 18px;
    font-weight: 600;
}

.selected-customer p {
    margin: 0 0 4px 0;
    color: #86868b;
    font-size: 14px;
    font-weight: 400;
}

/* Cleanings List */
.cleanings-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.cleaning-item {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 16px;
}

.cleaning-item:hover {
    background: rgba(0, 122, 255, 0.05);
    border-left: 4px solid #007AFF;
}

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

.cleaning-item.selected {
    background: rgba(0, 122, 255, 0.1);
    border-left: 4px solid #007AFF;
}

.cleaning-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #34C759, #30D158);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
}

.cleaning-info h3 {
    margin: 0 0 4px 0;
    color: #1d1d1f;
    font-size: 16px;
    font-weight: 600;
}

.cleaning-info p {
    margin: 0;
    color: #86868b;
    font-size: 14px;
    font-weight: 400;
}

.cleaning-meta {
    margin-left: auto;
    text-align: right;
    color: #86868b;
    font-size: 12px;
    font-weight: 500;
}

/* Selected Cleaning */
.selected-cleaning {
    background: rgba(52, 199, 89, 0.1);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 2px solid #34C759;
}

.selected-cleaning h3 {
    margin: 0 0 8px 0;
    color: #1d1d1f;
    font-size: 18px;
    font-weight: 600;
}

.selected-cleaning p {
    margin: 0 0 4px 0;
    color: #86868b;
    font-size: 14px;
    font-weight: 400;
}

/* Link Generation */
.link-generation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.generated-link-container label {
    display: block;
    margin-bottom: 8px;
    color: #1d1d1f;
    font-weight: 600;
    font-size: 16px;
}

.link-input-group {
    display: flex;
    gap: 12px;
}

.link-input-group input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(0, 122, 255, 0.1);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 400;
    background: rgba(255, 255, 255, 0.9);
    color: #1d1d1f;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

.link-input-group input:focus {
    outline: none;
    border-color: #007AFF;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.copy-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
}

.copy-btn.copied {
    background: linear-gradient(135deg, #34C759, #30D158);
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
}

/* Link Preview */
.link-preview h3 {
    margin: 0 0 12px 0;
    color: #1d1d1f;
    font-size: 16px;
    font-weight: 600;
}

.preview-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #007AFF;
    font-weight: 600;
    font-size: 14px;
}

.preview-content p {
    margin: 0 0 6px 0;
    color: #86868b;
    font-size: 14px;
    font-weight: 400;
}

.preview-content p:last-child {
    margin-bottom: 0;
}

/* Step Actions */
.step-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #86868b;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: white;
    border-color: #007AFF;
    color: #007AFF;
}

/* Navigation */
.navigation {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}

.nav-btn {
    padding: 12px 24px;
    border: 2px solid rgba(0, 122, 255, 0.2);
    background: rgba(255, 255, 255, 0.9);
    color: #86868b;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav-btn:hover:not(:disabled) {
    background: white;
    border-color: #007AFF;
    color: #007AFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

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

.nav-btn.primary {
    background: linear-gradient(135deg, #007AFF, #5856D6);
    border-color: #007AFF;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* Loading States */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: #86868b;
    font-size: 16px;
    font-weight: 400;
}

.loading-state i {
    font-size: 20px;
    color: #007AFF;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #86868b;
}

.empty-state i {
    font-size: 48px;
    color: #d1d1d6;
    margin-bottom: 16px;
}

.empty-state h3 {
    margin: 0 0 8px 0;
    color: #86868b;
    font-size: 18px;
    font-weight: 600;
}

.empty-state p {
    margin: 0;
    color: #c7c7cc;
    font-size: 14px;
    font-weight: 400;
}

/* Responsive Design */
@media (max-width: 768px) {
    .link-generator-container {
        padding: 16px;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .header-text h1 {
        font-size: 24px;
    }
    
    .main-content {
        margin: 0;
        border-radius: 12px;
    }
    
    .step-container {
        padding: 20px;
    }
    
    .link-generation {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .step-actions {
        flex-direction: column;
    }
    
    .navigation {
        flex-direction: column;
    }
    
    .nav-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header-text h1 {
        font-size: 20px;
    }
    
    .header-text p {
        font-size: 14px;
    }
    
    .step-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .customer-item, .cleaning-item {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .customer-meta, .cleaning-meta {
        margin-left: 0;
        text-align: center;
    }
}

/* Animation for step transitions */
.step-container {
    animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Success animations */
.copied {
    animation: pulse 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}
