/* Verify Page Stylesheet */
:root {
    --primary-color: #87a079;
    --bg-component-color: #191b17;
    --main-bg-gradient: radial-gradient(circle, #87a079 5%, #496951, #16362b);
    --danger-color: #e57373;
}

body {
    background-image: var(--main-bg-gradient);
    background-attachment: fixed;
    min-height: 100vh;
    font-family: 'Manrope', sans-serif;
    color: #fff;
    margin: 0;
    overflow: hidden;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 700, 'GRAD' 0, 'opsz' 24;
}

/* Layout */
.verify-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 100vh;
    padding: 1rem;
}

@media(max-width: 480px) {
    .verify-container{
        justify-content: unset !important;
    }
}

@media (min-width: 640px) {
    .verify-container {
        padding: 1.5rem;
    }
}

.verify-header {
    width: 100%;
    max-width: 28rem;
    margin-top: 4rem;
    display: flex;
    justify-content: center;
}

@media (min-width: 768px) {
    .verify-header {
        margin-top: 5rem;
    }
}
@media (max-width: 480px) {
    .verify-header {
        margin-top: 38%;
    }

    .verify-header img {
        width: 100% !important;
        max-width: 300px;
    }
}

.verify-header img {
    width: 28rem;
    margin: 0 auto;
    display: block;
}

.verify-main {
    width: 100%;
    max-width: 28rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 8rem;
}

.verify-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.verify-description {
    text-align: center;
    color: #d1d5db;
    font-size: 1rem;
}

/* Search Input */
.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 28rem;
    margin: 0 auto;
}

/* Inner wrapper so icon stays locked to input, not affected by error messages */
.input-icon-wrapper {
    position: relative;
    width: 100%;
}

.company-search {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 1rem;
    padding-right: 3.75rem; /* reserve stable space for validation icon */
    background-color: #fff;
    border: 2px solid var(--primary-color);
    border-radius: 0.5rem;
    color: #111827;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;

} 

.company-search::placeholder {
    color: #6b7280;
    font-family: 'Manrope', sans-serif;
    font-size: 0.75rem;
    text-align: center;

}

.company-search:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(135, 160, 121, 0.2);
}

.validation-icon-container {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem; /* fixed width to avoid layout changes */
    height: 2.5rem;
    pointer-events: none; /* allow clicks to reach the input */
    z-index: 5;
}

.validation-icon-container .material-symbols-outlined {
    pointer-events: auto; /* icons themselves can still receive pointer events if needed */
}

/* Override the global .hidden inside the validation container so the element still reserves space
   while appearing invisible — this prevents the text / placeholder from shifting when icons toggle */
.validation-icon-container .validation-hidden {
    display: inline-flex !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Scoped utility for validation icons to avoid colliding with global .hidden rules */
.validation-hidden {
    display: none !important;
    visibility: hidden;
    opacity: 0;
}

.valid-icon,
.invalid-icon {
    font-size: 1.25rem;
}

.valid-icon {
    color: var(--primary-color);
}

.invalid-icon {
    color: var(--danger-color);
}

.hidden {
    display: none !important;
}

/* Dropdown */
.company-dropdown {
    position: absolute;
    z-index: 10;
    width: 100%;
    margin-top: 0.5rem;
    background-color: var(--bg-component-color);
    border: 1px solid #374151;
    border-radius: 0.5rem;
    max-height: 12rem;
    overflow-y: auto;
}

.company-dropdown-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    color: #fff;
    transition: background-color 0.15s ease-in-out;
}

.company-dropdown-item:hover {
    background-color: #374151;
}

.verified-company {
    opacity: 0.7;
}

.verified-badge {
    font-size: 0.75rem;
    color: #87a079;
    margin-left: 0.5rem;
}

.company-error-message {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background-color: rgba(229, 115, 115, 0.2);
    border: 1px solid var(--danger-color);
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.875rem;
    text-align: center;
    min-height: 3.2rem; /* reserve vertical space so showing/hiding doesn't reflow */
    transition: opacity 160ms ease, transform 160ms ease;
    opacity: 1;
}

.company-error-message.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
} 

/* Informational message (used when company is not found) */
.company-info-message {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background-color: rgba(135, 160, 121, 0.12);
    border: 1px solid var(--primary-color);
    border-radius: 0.5rem;
    color: #e6f7ea;
    font-size: 0.875rem;
    text-align: center;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px; /* reserve vertical space */
    transition: opacity 160ms ease;
    opacity: 1;
}

.company-info-message.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.company-dropdown::-webkit-scrollbar {
    width: 8px;
}

.company-dropdown::-webkit-scrollbar-track {
    background: #2d3748;
    border-radius: 10px;
}

.company-dropdown::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 10px;
    border: 2px solid #2d3748;
}

.company-dropdown::-webkit-scrollbar-thumb:hover {
    background-color: #a0b995;
}

/* Button */
.verify-button {
    width: 100%;
    max-width: 28rem;
    margin-top: 3rem;
}

@media (max-width: 480px) {
    .verify-button {
        width: 100%;
        max-width: 28rem;
        margin-bottom: 3rem;
    }
}

.continue-button {
    font-size: 1rem;
    font-weight: 200;
    font-family: 'Manrope', sans-serif;
    width: 100%;
    height: 3rem;
    padding: 0 1rem;
    background-color: var(--primary-color);
    color: var(--bg-component-color);
    font-size: 1rem;
    font-weight: 200;
    border-radius: 0.5rem;
    letter-spacing: 0.025em;
    transition: background-color 0.15s ease-in-out;
    border: none;
    cursor: pointer;
}

.continue-button:hover:not(:disabled) {
    background-color: rgba(135, 160, 121, 0.9);
    font-size: 1rem;
    font-weight: 200;
    font-family: 'Manrope', sans-serif;
}

.continue-button:disabled {
    background-color: #4b5563;
    cursor: not-allowed;
    color: whitesmoke;
    font-size: 1rem;

}

/* Footer */
.verify-footer {
    width: 100%;
    max-width: 80rem;
    padding: 2rem 1rem;
    border-top: 1px solid #1f2937;
    bottom : 0;
}

@media (min-width: 768px) {
    .verify-footer {
        padding: 2rem 2.5rem;
    }
}

.footer-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
    }
}

.footer-text {
    font-size: 0.875rem;
    color: #9ca3af;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-link {
    font-size: 0.875rem;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

.footer-link:hover {
    color: var(--primary-color);
}

/* Modal */
.company-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.company-modal.flex {
    display: flex;
}

.company-modal.hidden {
    display: none;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 32rem;
    background-color: var(--bg-component-color);
    border-radius: 0.75rem;
    border: 1px solid #374151;
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .modal-content {
        padding: 2rem;
    }
}

.close-modal-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #9ca3af;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s ease-in-out;
}

.close-modal-btn:hover {
    color: #fff;
}

.close-modal-icon {
    font-size: 1.875rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 0.25rem;
}

.form-input,
.form-select {
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid #374151;
    background-color: #1f2937;
    color: #fff;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(135, 160, 121, 0.2);
}

.form-input::placeholder {
    color: #9ca3af;
}

.modal-submit-btn {
    width: 100%;
    margin-top: 1rem;
    height: 3rem;
    padding: 0 1.25rem;
    background-color: var(--primary-color);
    color: var(--bg-component-color);
    font-size: 1rem;
    font-weight: 700;
    border-radius: 0.5rem;
    letter-spacing: 0.025em;
    transition: background-color 0.15s ease-in-out;
    border: none;
    cursor: pointer;
}

.modal-submit-btn:hover {
    background-color: rgba(135, 160, 121, 0.9);
}

/* Tooltip */
.tooltip {
    position: relative;
}

/* Icon animations */
@keyframes pop {
    0% { transform: scale(0.85); opacity: 0; }
    50% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes shake {
    0% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
    100% { transform: translateX(0); }
}

.icon-pop {
    display: inline-block;
    animation: pop 260ms cubic-bezier(.2,.9,.3,1) forwards;
}

.icon-shake {
    display: inline-block;
    animation: shake 420ms ease-in-out forwards;
}
.tooltip .tooltip-text {
    visibility: hidden;
    width: 140px;
    background-color: var(--bg-component-color);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    top: 125%;
    right: 0;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
    border: 1px solid var(--primary-color);
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Go Back button */
.back-button {
    position: absolute;
    left: 1rem;
    top: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out, transform 0.08s ease;
    backdrop-filter: blur(4px);
    z-index: 60;
    font-weight: 400;
    font-size: 1rem;
}

.back-button:hover {
    background: rgba(135,160,121,0.12);
    border-color: rgba(135,160,121,0.6);
    transform: translateY(-1px);
}

.back-button .material-symbols-outlined {
    font-size: 1.25rem;
}

.back-button .back-text {
    display: inline-block;
}

/* On very small screens, hide the 'Back' label to save space */
@media (max-width: 420px) {
    .back-button {
        left: 0.75rem;
        top: 0.85rem;
        padding: 0.4rem 0.5rem;
    }
    .back-button .back-text {
        display: none;
    }
}
