/* Make an Offer Dropdown Styles */

/* Container for the dropdown */
.offer-dropdown-container {
    position: relative;
    z-index: 1000;
    width: 100%;
    margin-top: -1px; /* Overlap with row border */
}

/* Dropdown card style */
.offer-dropdown {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 
                0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    animation: slideDown 0.2s ease-out;
}

/* Arrow indicator - position near the M button */
.offer-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 90px; /* Position near the M button on the right */
    width: 16px;
    height: 16px;
    background: #1e293b;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    z-index: 1;
}

/* Alternative arrow positioning using CSS variable */
.offer-dropdown[style*="--arrow-position"]::before {
    left: var(--arrow-position);
    right: auto;
    transform: translateX(-50%) rotate(45deg);
}

/* Dropdown header */
.offer-dropdown-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.offer-dropdown-header h4 {
    margin: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.offer-dropdown-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.2s ease;
}

.offer-dropdown-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Dropdown body */
.offer-dropdown-body {
    padding: 1.25rem;
}

.offer-domain-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.offer-domain-info p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
}

.offer-domain-name {
    font-family: monospace;
    font-size: 1rem;
    font-weight: 600;
    color: #60a5fa;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    display: inline-block;
}

/* Form styles */
.offer-dropdown-form label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.offer-amount-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem;
    color: white;
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.offer-amount-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(0, 0, 0, 0.4);
}

.offer-amount-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Chrome number input spinner styling */
.offer-amount-input::-webkit-inner-spin-button,
.offer-amount-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.offer-amount-input[type=number] {
    -moz-appearance: textfield;
}

.offer-message-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem;
    color: white;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.offer-message-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(0, 0, 0, 0.4);
}

.offer-message-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Buttons */
.offer-dropdown-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.offer-dropdown-submit {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.offer-dropdown-submit:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.offer-dropdown-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.offer-dropdown-cancel {
    background: rgba(107, 114, 128, 0.3);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.offer-dropdown-cancel:hover {
    background: rgba(107, 114, 128, 0.4);
}

/* Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dropdown row styling */
#offer-dropdown-row {
    background: transparent !important;
}

#offer-dropdown-row td {
    padding-top: 0 !important;
    padding-bottom: 10px !important;
    border-top: none !important;
    background: transparent !important;
}

/* Ensure dropdown stays within viewport */
.offer-dropdown-container {
    padding: 0 15px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .offer-dropdown-container {
        padding: 0 10px;
    }
    
    .offer-dropdown::before {
        right: 80px;
    }
}

/* Overlay for mobile */
@media (max-width: 640px) {
    .offer-dropdown-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 999;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1rem;
    }
    
    .offer-dropdown-container {
        position: static;
        width: 100%;
        max-width: 400px;
    }
    
    .offer-dropdown::before {
        display: none;
    }
}