﻿/* Public Subscription Search Styles */

.public-search-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.search-header {
    text-align: center;
    margin-bottom: 2rem;
}

    .search-header h1 {
        color: #2c5aa0;
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }

.search-subtitle {
    color: #6c757d;
    font-size: 1.1rem;
}

.search-form-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.search-instructions {
    margin-bottom: 2rem;
}

.instruction-card {
    background: #f8f9fa;
    border-left: 4px solid #2c5aa0;
    padding: 1.5rem;
    border-radius: 8px;
}

    .instruction-card h3 {
        color: #2c5aa0;
        margin-bottom: 1rem;
    }

    .instruction-card ul {
        margin-bottom: 1rem;
    }

.privacy-note {
    background: #e8f5e8;
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .privacy-note i {
        color: #28a745;
    }

.search-fields {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.search-option {
    padding: 1.5rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

    .search-option:hover {
        border-color: #2c5aa0;
    }

    .search-option h4 {
        color: #2c5aa0;
        margin-bottom: 1rem;
    }

.search-divider {
    text-align: center;
    position: relative;
    margin: 1rem 0;
}

    .search-divider span {
        background: white;
        padding: 0 1rem;
        color: #6c757d;
        font-weight: 600;
    }

    .search-divider::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background: #dee2e6;
        z-index: -1;
    }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

    .form-control:focus {
        outline: none;
        border-color: #2c5aa0;
        box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
    }

.field-note {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

.search-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #2c5aa0;
    color: white;
}

    .btn-primary:hover {
        background: #1e3d6f;
        transform: translateY(-1px);
    }

.btn-secondary {
    background: #6c757d;
    color: white;
}

    .btn-secondary:hover {
        background: #545b62;
    }

.btn-search {
    padding: 0.875rem 2rem;
    font-size: 1.1rem;
}

.search-errors {
    margin-top: 1rem;
}

/* Search Results */
.search-results-section {
    margin-top: 2rem;
}

.results-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

    .results-header h3 {
        color: #2c5aa0;
        margin-bottom: 0.5rem;
    }

.subscription-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.subscription-result-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 1.5rem;
    border-left: 4px solid #28a745;
}

    .subscription-result-card.expired {
        border-left-color: #dc3545;
        opacity: 0.8;
    }

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.subscriber-name {
    color: #2c5aa0;
    margin: 0;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

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

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

.result-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
}

    .detail-item i {
        width: 16px;
    }

.result-actions {
    text-align: center;
}

.btn-request-access {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

    .btn-request-access:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    }

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.no-results h3 {
    color: #2c5aa0;
    margin-bottom: 1rem;
}

.no-results-suggestions {
    text-align: left;
    max-width: 500px;
    margin: 2rem auto;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

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

    .no-results-suggestions ul {
        margin-bottom: 1rem;
    }

.help-text {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

/* Access Modal */
.access-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 2001;
}

.modal-header {
    background: linear-gradient(135deg, #2c5aa0, #1e3d6f);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .modal-header h3 {
        margin: 0;
        font-size: 1.3rem;
    }

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    transition: background 0.2s;
}

    .modal-close:hover {
        background: rgba(255, 255, 255, 0.3);
    }

.modal-body {
    padding: 2rem;
}

.email-display {
    background: #e8f5e8;
    border: 2px solid #28a745;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
    font-family: monospace;
    font-weight: bold;
    color: #155724;
    text-align: center;
}

.verification-form {
    margin: 1.5rem 0;
}

.code-input {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
    font-family: monospace;
    font-weight: bold;
}

.expiration-notice {
    text-align: center;
    color: #856404;
    font-weight: 500;
    margin-top: 1rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

.resend-section {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.btn-link {
    background: none;
    border: none;
    color: #2c5aa0;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
}

    .btn-link:hover {
        color: #1e3d6f;
    }

.success-message {
    text-align: center;
}

.success-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.access-info {
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
}

.access-timer {
    font-size: 1.1rem;
    color: #dc3545;
    margin-bottom: 0.5rem;
}

.access-scope {
    color: #495057;
    font-size: 0.9rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-success {
    background: #28a745;
    color: white;
}

    .btn-success:hover {
        background: #218838;
    }

/* Responsive Design */
@media (max-width: 768px) {
    .public-search-container {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }

    .search-header h1 {
        font-size: 2rem;
    }

    .search-form-section {
        padding: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .search-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .modal-header {
        padding: 1rem 1.5rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Animation for spinning icon */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.spinning {
    animation: spin 1s linear infinite;
}
