/**
 * Phone Verification Apps - Frontend Styles
 */

/* Base Styles */
.pva-verification-search,
.pva-phone-verification,
.pva-packages-standalone {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
}

/* Number Box */
.pva-number-box {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.pva-number-box:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.10);
    transform: translateY(-2px);
    border-color: #e2e8f0;
}

.pva-number-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

.pva-number-box-label {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
    color: #1f2937;
}

.pva-number-box-body {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.pva-flag-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.pva-country-flag {
    font-size: 1.5rem;
    line-height: 1;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.pva-buy-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.pva-buy-button:hover {
    background: linear-gradient(135deg, #764ba2, #48bb78);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.pva-buy-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.pva-number-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.pva-number-box .pva-number {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: #111827;
    flex: 1;
}

/* Grid for multiple numbers */
.pva-number-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
    background-color: #fff;
}


/* Messages */
.pva-message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pva-message-error {
    background: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
}

.pva-message-success {
    background: #d1e7dd;
    border: 1px solid #badbcc;
    color: #0f5132;
}

.pva-message-info {
    background: #cff4fc;
    border: 1px solid #b6effb;
    color: #055160;
}

.pva-message p {
    margin: 0;
    flex: 1;
}

.pva-message-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    margin-left: 1rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.pva-message-close:hover {
    opacity: 1;
}

/* Search Results */
.pva-results-list {
    margin-top: 1rem;
}

.pva-results-summary {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.pva-results-summary p {
    margin: 0;
    color: #495057;
}

.pva-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.pva-result-item {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.pva-result-item:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.15);
}

.pva-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f1f3f4;
}

.pva-result-number {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    font-family: 'Courier New', monospace;
}

.pva-result-country {
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.pva-result-meta {
    margin-bottom: 1rem;
}

.pva-meta-item {
    display: inline-block;
    background: #f8f9fa;
    color: #6c757d;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

.pva-result-status {
    margin-bottom: 0.5rem;
}

.pva-status {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pva-status-active {
    background: #d4edda;
    color: #155724;
}

.pva-status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.pva-status-pending {
    background: #fff3cd;
    color: #856404;
}

.pva-status-unknown {
    background: #e2e3e5;
    color: #383d41;
}

.pva-result-date {
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
}

.pva-no-results {
    text-align: center;
    padding: 3rem 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    color: #6c757d;
}

.pva-no-results h4 {
    color: #495057;
    margin-bottom: 1rem;
}

/* Verification Results */
.pva-verification-result {
    margin-top: 1rem;
}

.pva-result-success,
.pva-result-error {
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.pva-result-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #b8dacc;
    color: #155724;
}

.pva-result-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c2c7 100%);
    border: 2px solid #f1aeb5;
    color: #842029;
}

.pva-result-success h4,
.pva-result-error h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.pva-verification-details {
    margin-top: 1.5rem;
    text-align: left;
    background: rgba(255, 255, 255, 0.7);
    padding: 1rem;
    border-radius: 8px;
}

.pva-verification-details h5 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.pva-verification-details pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    overflow-x: auto;
    border: 1px solid #dee2e6;
}

/* Copy Button */
.pva-copy-button {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
}

.pva-copy-button:hover {
    background: #5a6268;
}

.pva-copy-button.copied {
    background: #28a745;
}

/* Loading States */
.pva-package-button.loading,
.pva-search-button:disabled,
.pva-verify-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.button-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.pva-result-item {
    animation: fadeInUp 0.5s ease-out;
}

.pva-result-item:nth-child(1) { animation-delay: 0.1s; }
.pva-result-item:nth-child(2) { animation-delay: 0.2s; }
.pva-result-item:nth-child(3) { animation-delay: 0.3s; }
.pva-result-item:nth-child(4) { animation-delay: 0.4s; }

/* Responsive Design */
@media (max-width: 768px) {
    .pva-results-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .pva-result-item {
        padding: 1rem;
    }
    
    .pva-result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .pva-result-number {
        font-size: 1rem;
    }
    
    .pva-verification-result {
        margin: 1rem 0;
    }
    
    .pva-result-success,
    .pva-result-error {
        padding: 1.5rem 1rem;
    }
    
    .pva-message {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .pva-message-close {
        align-self: flex-end;
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .pva-result-item {
        padding: 0.75rem;
    }
    
    .pva-result-number {
        font-size: 0.9rem;
        word-break: break-all;
    }
    
    .pva-meta-item {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
    
    .pva-verification-details pre {
        font-size: 0.75rem;
        padding: 0.75rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .pva-result-item {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    .pva-result-item:hover {
        border-color: #63b3ed;
    }
    .pva-result-number {
        color: #e2e8f0;
    }
    .pva-result-country {
        background: #4a5568;
        color: #e2e8f0;
    }
    .pva-meta-item {
        background: #4a5568;
        color: #cbd5e0;
    }
    .pva-no-results {
        background: #2d3748;
        color: #cbd5e0;
    }
    .pva-no-results h4 {
        color: #e2e8f0;
    }
    .pva-verification-details {
        background: rgba(45, 55, 72, 0.7);
    }
    .pva-verification-details h5 {
        color: #e2e8f0;
    }
    .pva-verification-details pre {
        background: #1a202c;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    /* Number box dark mode */
    .pva-number-box {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    .pva-number-box-label,
    .pva-number-box .pva-number {
        color: #e2e8f0;
    }
    .pva-number-box-header {
        border-bottom-color: #4a5568;
    }
}

/* Print Styles */
@media print {
    .pva-search-form,
    .pva-packages,
    .pva-message,
    .pva-copy-button {
        display: none !important;
    }
    
    .pva-result-item {
        break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 1rem;
    }
    
    .pva-verification-result {
        break-inside: avoid;
    }
}
