/*
 * &card Page Styles
 * Styles specific to the andcard.twig template
 */

/* Full-screen mobile chat styling */
body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Fallback for older browsers that don't support dvh */
@supports not (height: 100dvh) {
    body {
        min-height: -webkit-fill-available;
    }
}

html {
    height: -webkit-fill-available;
}

.mobile-chat-header {
    flex-shrink: 0;
    background: var(--color-primary-green-500);
}

.mobile-chat-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.close-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 10px;
    color: white;
}

/* Page loader styling */
.andcard-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.andcard-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-primary-grey-200);
    border-top: 4px solid var(--color-primary-green-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hidden by default - shown by JS when data loads */
.andcard-content {
    display: none;
}

.andcard-content.loaded {
    display: block;
}

/* Widget loader styling */
.widget-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 135px;
    color: var(--color-primary-grey-500);
}

.widget-loader-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-primary-grey-200);
    border-top: 2px solid var(--color-primary-green-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #666;
}

.modal-body {
    padding: 20px;
}

.share-option {
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid #eee;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.share-option:hover {
    background: #f5f5f5;
    border-color: #ddd;
}

.share-option i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
