/* ===================================
   REPAIR PRICE SEARCH PRO - FLOAT UI
   Mobile-First, Modern Design
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    /* Float UI Colors */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #14b8a6;
    
    /* Grays */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 30px rgba(102, 126, 234, 0.4);
    
    /* Transitions */
    --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   CONTAINER
   =================================== */

.float-ui-search-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

@media (min-width: 768px) {
    .float-ui-search-container {
        padding: 3rem 2rem;
    }
}

/* ===================================
   HEADER
   =================================== */

.search-header {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: fadeInDown 0.6s ease-out;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.header-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-glow);
    animation: floatAnimation 3s ease-in-out infinite;
}

.header-title {
    font-size: 2rem;
    font-weight: 900;
    margin: 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.header-subtitle {
    font-size: 1rem;
    color: var(--gray-600);
    margin: 0;
    font-weight: 500;
}

@media (min-width: 768px) {
    .header-title {
        font-size: 2.5rem;
    }
    
    .header-subtitle {
        font-size: 1.125rem;
    }
}

/* ===================================
   SEARCH FORM - FLOAT UI STYLE
   =================================== */

.search-form-wrapper {
    margin-bottom: 2rem;
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.float-ui-search-form {
    width: 100%;
}

.search-input-group {
    display: flex;
    align-items: stretch;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 2px solid var(--gray-200);
    transition: all var(--transition-smooth);
    position: relative;
}

.search-input-group:focus-within {
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.25rem;
    color: var(--gray-400);
    transition: color var(--transition);
}

.search-input-group:focus-within .search-icon {
    color: var(--primary);
}

.search-input {
    flex: 1;
    border: none;
    padding: 1rem 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-900);
    outline: none;
    background: transparent;
    font-family: inherit;
}

.search-input::placeholder {
    color: var(--gray-400);
    font-weight: 400;
}

.search-button {
    background: var(--gradient-primary);
    border: none;
    padding: 1rem 1.75rem;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.search-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.search-button:hover::before {
    width: 300px;
    height: 300px;
}

.search-button:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.search-button:active {
    transform: scale(0.98);
}

.button-text {
    position: relative;
    z-index: 1;
}

.button-icon {
    position: relative;
    z-index: 1;
    display: none;
}

@media (min-width: 640px) {
    .search-input {
        padding: 1.25rem 0.75rem;
        font-size: 1.0625rem;
    }
    
    .search-button {
        padding: 1.25rem 2.5rem;
    }
    
    .button-icon {
        display: flex;
    }
}

/* ===================================
   SEARCH TIPS
   =================================== */

.search-tips {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
    padding: 0.5rem 1rem;
    background: var(--gray-50);
    border-radius: 50px;
    border: 1px solid var(--gray-200);
}

.tip-item svg {
    color: var(--primary);
    flex-shrink: 0;
}

/* ===================================
   LOADING STATE
   =================================== */

.search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 3rem;
    animation: fadeIn 0.3s ease;
}

.search-loading.hidden {
    display: none;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
    margin: 0;
}

/* ===================================
   SEARCH RESULTS - DEVICE GRID
   =================================== */

.search-results {
    animation: fadeIn 0.5s ease;
}

.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

@media (max-width: 640px) {
    .devices-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
}

/* ===================================
   DEVICE CARD
   =================================== */

.device-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 2px solid var(--gray-200);
    cursor: pointer;
    transition: all var(--transition-smooth);
    animation: fadeInUp 0.5s ease both;
    position: relative;
}

.device-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-smooth);
}

.device-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: rgba(102, 126, 234, 0.4);
}

.device-card:hover::before {
    transform: scaleX(1);
}

.device-image-wrapper {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.device-card:hover .device-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
}

.device-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform var(--transition-smooth);
}

.device-card:hover .device-image {
    transform: scale(1.1);
}

.device-info {
    padding: 1.25rem;
    background: white;
}

.device-manufacturer {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    margin: 0 0 0.5rem 0;
}

.device-model {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.device-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-600);
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-200);
    transition: color var(--transition);
}

.device-card:hover .device-action {
    color: var(--primary);
}

.device-action svg {
    transition: transform var(--transition);
}

.device-card:hover .device-action svg {
    transform: translateX(4px);
}

/* ===================================
   DEVICE DETAIL VIEW
   =================================== */

.device-detail-view {
    animation: fadeIn 0.5s ease;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.back-button:hover {
    background: var(--gray-50);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(-4px);
    box-shadow: var(--shadow);
}

.back-button svg {
    transition: transform var(--transition);
}

.back-button:hover svg {
    transform: translateX(-4px);
}

.device-detail-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--gray-200);
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (min-width: 768px) {
    .device-detail-card {
        grid-template-columns: 400px 1fr;
    }
}

/* Detail Image Section */
.detail-image-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid var(--gray-200);
}

@media (min-width: 768px) {
    .detail-image-section {
        border-bottom: none;
        border-right: 2px solid var(--gray-200);
    }
}

.detail-image-wrapper {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.detail-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.detail-device-info {
    text-align: center;
}

.detail-manufacturer {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    margin: 0 0 0.5rem 0;
}

.detail-model {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0;
    line-height: 1.2;
}

/* Detail Prices Section */
.detail-prices-section {
    padding: 2.5rem;
}

.prices-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0 0 1.5rem 0;
}

.prices-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--gray-50);
    border-radius: 12px;
    transition: all var(--transition);
    border: 2px solid transparent;
}

.price-row:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, rgba(236, 72, 153, 0.08) 100%);
    border-color: rgba(102, 126, 234, 0.2);
    transform: translateX(4px);
}

.repair-type {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
}

.repair-price {
    font-size: 1.25rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-note {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    border-radius: 12px;
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.price-note svg {
    flex-shrink: 0;
    color: var(--primary);
    margin-top: 0.125rem;
}

.price-note p {
    font-size: 0.875rem;
    color: var(--gray-700);
    margin: 0;
    line-height: 1.5;
}

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

/* ===================================
   NO RESULTS
   =================================== */

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    animation: fadeIn 0.5s ease;
}

.no-results.hidden {
    display: none;
}

.no-results-icon {
    margin: 0 auto 1.5rem;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.no-results h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 0.5rem 0;
}

.no-results p {
    font-size: 1rem;
    color: var(--gray-600);
    margin: 0;
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes floatAnimation {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ===================================
   RESPONSIVE ADJUSTMENTS
   =================================== */

@media (max-width: 640px) {
    .float-ui-search-container {
        padding: 1.5rem 1rem;
    }
    
    .search-header {
        margin-bottom: 2rem;
    }
    
    .header-icon {
        width: 56px;
        height: 56px;
    }
    
    .header-title {
        font-size: 1.75rem;
    }
    
    .search-input-group {
        flex-direction: column;
        border-radius: 12px;
    }
    
    .search-button {
        width: 100%;
        justify-content: center;
        border-radius: 0 0 10px 10px;
    }
    
    /* Device grid adjustments */
    .devices-grid {
        grid-template-columns: 1fr;
    }
    
    .device-image-wrapper {
        height: 180px;
    }
    
    /* Detail view adjustments */
    .device-detail-card {
        grid-template-columns: 1fr;
    }
    
    .detail-image-section {
        padding: 2rem 1.5rem;
    }
    
    .detail-image-wrapper {
        max-width: 240px;
    }
    
    .detail-model {
        font-size: 1.5rem;
    }
    
    .detail-prices-section {
        padding: 1.5rem;
    }
    
    .prices-title {
        font-size: 1.25rem;
    }
    
    .price-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .repair-price {
        font-size: 1.5rem;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */

.search-input:focus,
.search-button:focus {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===================================
   SMOOTH SCROLLBAR
   =================================== */

.search-results::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 10px;
}

.search-results::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 10px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-light) 0%, #f472b6 100%);
}
