/**
 * HVAC Profile Sharing Styles
 *
 * @package HVAC_Community_Events
 * @version 1.0.0
 */

/* ========================================
   Page Header Actions
   ======================================== */

.hvac-page-header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.hvac-button.hvac-button-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #dee2e6;
    transition: all 0.3s;
}

.hvac-button.hvac-button-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #333;
    text-decoration: none;
}

.hvac-share-profile-btn .dashicons {
    font-size: 16px;
    margin-right: 8px;
    vertical-align: middle;
}

/* ========================================
   Share Profile Modal
   ======================================== */

.hvac-share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hvac-share-modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Modal Header */
.hvac-share-modal-title {
    margin: 0 0 16px 0;
    font-size: 32px;
    font-weight: 600;
    color: #333;
    text-align: center;
    line-height: 1.2;
}

.hvac-share-description {
    margin: 0 0 32px 0;
    font-size: 18px;
    color: #666;
    text-align: center;
    line-height: 1.5;
}

/* Close Button */
.hvac-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    border: 2px solid #333;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    padding: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.hvac-modal-close:hover {
    background: #333;
}

.hvac-modal-close .dashicons {
    font-size: 20px;
    color: #333;
}

.hvac-modal-close:hover .dashicons {
    color: white;
}

/* ========================================
   Share URL Section
   ======================================== */

.hvac-share-url-section {
    margin-bottom: 40px;
    padding: 24px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.hvac-share-url-label {
    display: block;
    margin-bottom: 12px;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.hvac-share-url-container {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.hvac-share-url-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: white;
    color: #495057;
    transition: border-color 0.3s;
}

.hvac-share-url-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.hvac-copy-url-btn {
    padding: 12px 24px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.hvac-copy-url-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.hvac-copy-url-btn:active {
    transform: translateY(0);
}

.hvac-copy-url-btn.copied {
    background: #28a745;
}

/* ========================================
   Profile Card Section
   ======================================== */

.hvac-share-card-section {
    text-align: center;
}

.hvac-share-card-description {
    margin: 0 0 24px 0;
    font-size: 18px;
    color: #666;
    font-weight: 500;
}

.hvac-share-profile-card-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 320px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
}

.hvac-share-profile-card-container.loaded {
    background: transparent;
    border: none;
    padding: 0;
}

/* Loading State */
.hvac-share-card-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: #666;
}

.hvac-share-card-loading .dashicons {
    font-size: 48px;
    animation: spin 1s linear infinite;
}

.hvac-share-card-loading p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   Shareable Profile Card
   ======================================== */

.hvac-share-profile-card {
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 32px;
    background: white;
    display: flex;
    align-items: center;
    gap: 32px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    max-width: 700px;
    margin: 0 auto;
}

.hvac-share-avatar {
    width: 160px;
    height: 160px;
    flex-shrink: 0;
    position: relative;
}

.hvac-share-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: #dee2e6;
}

.hvac-share-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: #6c757d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    font-weight: bold;
}

.hvac-share-details {
    flex: 1;
    min-width: 0;
}

.hvac-share-details h2 {
    margin: 0 0 12px 0;
    font-size: 32px;
    font-weight: 700;
    color: #212529;
    line-height: 1.2;
}

.hvac-share-business-name {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: #6c757d;
    font-weight: 600;
}

.hvac-share-location {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #6c757d;
    font-weight: 500;
}

.hvac-share-certification {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: #0073aa;
    font-weight: 700;
}

.hvac-share-qr {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 8px;
}

.hvac-share-qr img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* mQ Badge Overlay on Share Card */
.hvac-share-avatar .hvac-mq-badge-overlay {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 40px;
    height: 40px;
    z-index: 10;
    pointer-events: none;
}

.hvac-share-avatar .hvac-mq-badge {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

/* ========================================
   Mobile Responsive
   ======================================== */

@media (max-width: 768px) {
    .hvac-share-modal-content {
        padding: 24px;
        margin: 10px;
    }
    
    .hvac-share-modal-title {
        font-size: 24px;
    }
    
    .hvac-share-description {
        font-size: 16px;
    }
    
    .hvac-page-header-actions {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .hvac-share-url-container {
        flex-direction: column;
    }
    
    .hvac-share-profile-card {
        flex-direction: column;
        text-align: center;
        gap: 24px;
        padding: 24px;
    }
    
    .hvac-share-avatar {
        width: 120px;
        height: 120px;
        margin: 0 auto;
    }
    
    .hvac-share-details h2 {
        font-size: 24px;
    }
    
    .hvac-share-qr {
        width: 100px;
        height: 100px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .hvac-share-modal {
        padding: 10px;
    }
    
    .hvac-share-modal-content {
        padding: 20px;
    }
    
    .hvac-share-modal-title {
        font-size: 20px;
    }
    
    .hvac-share-profile-card {
        padding: 20px;
    }
}