@charset "UTF-8";

/* Responsive Design for Modern Search */

/* Tablet Styles (769px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .search-condition {
        width: 85%;
        padding: 20px;
    }

    .yield__section {
        padding: 25px 30px;
    }

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

    .yield__body .yield__list {
        width: 100%;
    }

    .index-title span {
        font-size: 40px;
    }
}

/* Mobile Landscape (481px - 768px) */
@media (max-width: 768px) and (min-width: 481px) {
    .banner-img {
        height: 350px;
    }

    .search-condition {
        position: relative;
        top: auto;
        transform: none;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        padding: 15px;
    }

    .yield__section {
        padding: 20px;
        border-width: 2px;
    }

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

    .yield__list select {
        width: 100%;
        max-width: 100%;
    }

    .yield__foot {
        flex-direction: column;
        gap: 15px;
    }
}

/* Mobile Portrait (320px - 480px) */
@media (max-width: 480px) {
    .banner.main-banner {
        /* min-height: 100vh; */
        display: flex;
        flex-direction: column;
    }

    .banner-img {
        height: 300px;
        flex-shrink: 0;
    }

    .index-title span {
        font-size: 28px;
        padding: 0 20px;
    }

    .search-condition {
        position: relative;
        top: auto;
        transform: none;
        padding: 15px;
        background: rgba(76, 76, 76, 0.9);
    }

    .yield__section {
        padding: 20px 15px;
        border-width: 2px;
    }

    .yield__ttl {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .yield__list {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .yield__sub-ttl {
        width: 100%;
        margin-bottom: 5px;
    }

    .yield__body {
        flex-direction: column;
        gap: 15px;
    }

    .yield__body .yield__list {
        width: 100%;
    }

    .yield__list select {
        width: 100%;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .yield__foot {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .yield__btn {
        width: 100%;
        padding: 16px;
    }
}

/* Small Mobile (less than 320px) */
@media (max-width: 320px) {
    .index-title span {
        font-size: 24px;
    }

    .search-condition {
        padding: 15px 10px;
    }

    #inv-search-form select {
        font-size: 14px;
        padding: 6px 35px 6px 12px;
    }

    #seach-new {
        font-size: 16px;
        padding: 14px;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    #inv-search-form select {
        border-width: 1px;
    }
}

/* Orientation Changes */
@media (orientation: landscape) and (max-width: 768px) {
    .banner-img {
        height: 250px;
    }

    .search-condition {
        padding: 15px 20px;
    }

    #inv-search-form {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    #seach-new,
    #result-count {
        grid-column: 1 / -1;
    }
}

/* Print Styles */
@media print {
    .banner.main-banner {
        page-break-inside: avoid;
    }

    .search-condition {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    #seach-new {
        display: none;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .search-condition,
    #inv-search-form select,
    #seach-new {
        transition: none !important;
        animation: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .search-condition {
        background: rgba(30, 30, 30, 0.98);
    }

    #inv-search-form select {
        background-color: #2a2a2a;
        color: #ffffff;
        border-color: #444;
    }

    #inv-search-form select:hover {
        border-color: #E6002D;
    }

    #seach-new {
        background: #E6002D;
    }

    #seach-new:hover {
        background: #ff1a3d;
    }

    .error-message {
        color: #ff6b6b;
    }
}

/* Hover Effects for Touch Devices */
@media (hover: none) and (pointer: coarse) {
    #inv-search-form select:hover,
    #seach-new:hover {
        /* Remove hover effects on touch devices */
        border-color: inherit;
        transform: none;
        box-shadow: none;
    }

    /* Add active states instead */
    #inv-search-form select:active {
        border-color: #E6002D;
    }

    #seach-new:active {
        background: #B30021;
        transform: scale(0.98);
    }
}

/* Foldable Devices */
@media (max-width: 280px) {
    .search-condition {
        padding: 10px;
    }

    #inv-search-form {
        gap: 8px;
    }

    #inv-search-form select,
    #seach-new {
        font-size: 13px;
        padding: 10px;
    }
}