/**
 * COA Verification Plugin - Public Styles
 */

/* Container and general setup */
.coa-search-widget-wrapper {
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.coa-search-widget-wrapper *, 
.coa-search-widget-wrapper *::before, 
.coa-search-widget-wrapper *::after {
    box-sizing: border-box;
}

/* --------------------------------------------------
   SEARCH BAR STYLING
-------------------------------------------------- */
.coa-search-form-container {
    width: 100%;
    position: relative;
    margin-bottom: 25px;
}

.coa-search-form {
    width: 100%;
    position: relative;
}

.coa-input-group {
    display: flex;
    align-items: center;
    width: 100%;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    padding: 6px 6px 6px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.coa-input-group:focus-within {
    border-color: #a88c52;
    box-shadow: 0 4px 20px rgba(168, 140, 82, 0.15);
}

.coa-search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.coa-search-icon-svg {
    transition: transform 0.3s ease;
}

.coa-input-group:focus-within .coa-search-icon-svg {
    transform: scale(1.1);
}

.coa-search-input {
    flex-grow: 1;
    border: none !important;
    background: transparent !important;
    padding: 10px 0 !important;
    font-size: 16px;
    color: #333333;
    outline: none !important;
    box-shadow: none !important;
    width: 100%;
}

.coa-search-input::placeholder {
    color: #888888;
    opacity: 1;
}

/* Button & Spinner */
.coa-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #a88c52;
    color: #ffffff;
    border: none;
    outline: none;
    border-radius: 30px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
    position: relative;
}

.coa-search-btn:hover {
    background-color: #8f733f;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(143, 115, 63, 0.2);
}

.coa-search-btn:active {
    transform: translateY(0);
}

.coa-btn-text {
    transition: opacity 0.2s ease;
}

.coa-btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: coa-spin 0.8s linear infinite;
    position: absolute;
}

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

/* --------------------------------------------------
   AJAX DROPDOWN STYLING
-------------------------------------------------- */
.coa-search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 999;
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid #f1f5f9;
    padding: 8px 0;
    animation: coa-slide-down 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes coa-slide-down {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dropdown custom scrollbar */
.coa-search-results-dropdown::-webkit-scrollbar {
    width: 6px;
}
.coa-search-results-dropdown::-webkit-scrollbar-track {
    background: transparent;
}
.coa-search-results-dropdown::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}

.coa-dropdown-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f8fafc;
}

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

.coa-dropdown-item:hover,
.coa-dropdown-item.active {
    background-color: #f9f6f0;
}

.coa-dropdown-item-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.coa-dropdown-item-batch {
    font-size: 12px;
    font-weight: 500;
    color: #a88c52;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.coa-dropdown-no-results,
.coa-dropdown-error {
    padding: 18px 20px;
    text-align: center;
    font-size: 14px;
    color: #64748b;
}

.coa-dropdown-error {
    color: #ef4444;
}

/* --------------------------------------------------
   INSTRUCTION STEPS GRID STYLING
-------------------------------------------------- */
.coa-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 50px;
    width: 100%;
}

.coa-step-card {
    background-color: #FAF6F0;
    padding: 35px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border: 1px solid rgba(168, 140, 82, 0.08);
}

.coa-step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(168, 140, 82, 0.06);
    border-color: rgba(168, 140, 82, 0.2);
}

.coa-step-number {
    font-size: 16px;
    font-weight: 600;
    color: #a88c52;
    border: 1.5px solid #a88c52;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    border-radius: 2px;
    line-height: 1;
}

.coa-step-title {
    font-size: 18px;
    font-weight: 600;
    color: #1C1C1C;
    margin: 0 0 12px 0;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.coa-step-desc {
    font-size: 14px;
    color: #6B6B6B;
    margin: 0;
    line-height: 1.6;
}

/* --------------------------------------------------
   RESPONSIVENESS (MEDIA QUERIES)
-------------------------------------------------- */

/* Desktop & Large Screen Adjustments */
@media (min-width: 1025px) {
    /* Base grid styles apply */
}

/* Tablets (Portrait and Landscape) - Max 1024px */
@media (max-width: 1024px) {
    .coa-steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-top: 40px;
    }
    
    .coa-step-card {
        padding: 30px;
    }
}

/* Mobile & Small Tablets - Max 768px */
@media (max-width: 768px) {
    .coa-input-group {
        padding: 4px 4px 4px 16px;
    }

    .coa-search-input {
        font-size: 15px;
        padding: 8px 0 !important;
    }

    .coa-search-btn {
        padding: 10px 22px;
        font-size: 14px;
    }

    .coa-steps-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 35px;
    }

    .coa-step-card {
        padding: 25px;
        align-items: flex-start;
    }

    .coa-step-number {
        margin-bottom: 18px;
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .coa-step-title {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .coa-step-desc {
        font-size: 13.5px;
    }
}

/* Small Mobile Devices - Max 480px */
@media (max-width: 480px) {
    .coa-input-group {
        flex-direction: row; /* Keep it in a row for search layout, but make sure text fits */
        padding: 3px 3px 3px 12px;
    }

    .coa-search-icon {
        margin-right: 8px;
    }

    .coa-search-input {
        font-size: 14px;
    }

    .coa-search-btn {
        padding: 8px 16px;
        font-size: 13px;
        border-radius: 20px;
    }

    .coa-dropdown-item {
        padding: 10px 16px;
    }

    .coa-dropdown-item-title {
        font-size: 14px;
    }

    .coa-step-card {
        padding: 20px;
    }
}
