/**
 * VND Member Portal - Frontend Styles
 *
 * Main stylesheet for member portal frontend components
 */

/* ========================================================================
   GENERAL STYLES
   ======================================================================== */

.vnd-member-portal * {
    box-sizing: border-box;
}

/* ========================================================================
   LOGIN FORM STYLES
   ======================================================================== */

/* OVERLAY AND OUTER */
header{
    z-index:11;
    position: relative;
}

.vnd-member-login-outer{
    background-image: url("/wp-content/uploads/2019/01/DSC03081.jpg");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    padding: 1rem;
    height: 70vh;
}

@media only screen and (min-width:1440px){
    .vnd-member-login-outer{
        height: 79vh;
    }
}

@media only screen and (min-width:1920px){
    .vnd-member-login-outer{
        height: 85vh;
    }
}

.vnd-member-login-overlay{
    background-color: #11243a;
    opacity: 0.69;
    transition: background 0.3s, border-radius 0.3s, opacity 0.3s;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    position: absolute;
}

#vnd-member-login-form button[type='submit']{
    background: #344;
}
#vnd-member-login-form button[type='submit']:hover{
    background: #005a87;
}

/* AL: WP themes interfere with styling */
.vnd-close-message{
    display:none;
}

.vnd-member-login-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 0 20px;
    z-index: 10;
    position:relative;
}

.vnd-login-card {
    background: rgba(255, 255, 255, .95);
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.vnd-login-header h2 {
    text-align: center;
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
}

.vnd-login-description {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

/* Form Styles */
.vnd-login-form .vnd-form-group {
    margin-bottom: 20px;
}

.vnd-form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.vnd-required {
    color: #d63638;
}

.vnd-form-input,
.vnd-form-select,
.vnd-form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e1e1;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.4;
    transition: border-color 0.2s ease;
    background-color: #fff;
}

.vnd-form-input:focus,
.vnd-form-select:focus,
.vnd-form-textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.vnd-form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Button Styles */
.vnd-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
}

.vnd-button-primary {
    background-color: #0073aa;
    color: #ffffff;
}

.vnd-button-primary:hover {
    background-color: #005a87;
    color: #ffffff;
}

.vnd-button-secondary {
    background-color: #f0f0f1;
    color: #333;
    border: 1px solid #ccd0d4;
}

.vnd-button-secondary:hover {
    background-color: #e0e0e1;
    color: #333;
}

.vnd-button-outline {
    background-color: transparent;
    color: #0073aa;
    border: 2px solid #0073aa;
}

.vnd-button-outline:hover {
    background-color: #0073aa;
    color: #ffffff;
}

.vnd-button-full {
    width: 100%;
}

.vnd-button-large {
    padding: 16px 32px;
    font-size: 16px;
}

.vnd-button:disabled,
.vnd-button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.vnd-button-spinner {
    margin-left: 8px;
}

.vnd-button-spinner svg {
    animation: vnd-spin 1s linear infinite;
}

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

/* Message Styles */
.vnd-success-message,
.vnd-error-message,
.vnd-warning-message,
.vnd-form-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin: 16px 0;
}

.vnd-success-message {
    background-color: #f0f6fc;
    border-left: 4px solid #00a32a;
    color: #00a32a;
}

.vnd-error-message {
    background-color: #fcf0f1;
    border-left: 4px solid #d63638;
    color: #d63638;
}

.vnd-warning-message {
    background-color: #fcf9e8;
    border-left: 4px solid #dba617;
    color: #dba617;
}

/* Login Divider */
.vnd-login-divider {
    text-align: center;
    margin: 30px 0 20px 0;
    position: relative;
}

.vnd-login-divider:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e1e1;
}

.vnd-login-divider span {
    background: #ffffff;
    padding: 0 15px;
    color: #666;
    font-size: 12px;
}

/* Forgot Credentials Section */
.vnd-forgot-section {
    text-align: center;
}

.vnd-link-button {
    background: none;
    border: none;
    color: #0073aa;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
}

#vnd-forgot-toggle:focus,
#vnd-forgot-toggle:hover{
    background: #fff;
}

.vnd-link-button:hover {
    color: #005a87;
}

.vnd-forgot-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e1e1;
    text-align: left;
}

.vnd-forgot-header h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.vnd-forgot-header p {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Login Footer */
.vnd-login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e1e1;
    text-align: center;
}

.vnd-login-help {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.vnd-login-help a {
    color: #0073aa;
    text-decoration: none;
}

.vnd-login-help a:hover {
    text-decoration: underline;
}

/* Already Logged In State */
.vnd-member-already-logged-in {
    text-align: center;
    padding: 40px 20px;
}

.vnd-member-actions {
    margin-top: 20px;
}

.vnd-member-actions .vnd-button {
    margin: 0 10px 10px 0;
}

/* ========================================================================
   DASHBOARD STYLES
   ======================================================================== */

.vnd-member-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.vnd-dashboard-header {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #0073aa;
}

.vnd-member-welcome-dashboard h2 {
    margin: 0 0 15px 0;
    color: #333;
}

.vnd-member-welcome-dashboard p {
    margin: 5px 0;
    color: #666;
}

.vnd-last-login {
    margin-top: 10px;
    opacity: 0.8;
}

/* Dashboard Grid */
.vnd-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.vnd-dashboard-card {
    background: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vnd-dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.vnd-card-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.vnd-card-content h4 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 18px;
}

.vnd-card-content p {
    margin: 0 0 16px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Navigation Styles */
.vnd-dashboard-nav,
.vnd-newsletter-member-nav,
.vnd-contact-member-nav {
    margin: 20px 0;
}

.vnd-member-menu,
.vnd-member-nav-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.vnd-member-menu li,
.vnd-member-nav-horizontal li {
    margin: 0;
}

.vnd-member-menu a,
.vnd-member-nav-horizontal a {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #f0f0f1;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.vnd-member-menu a:hover,
.vnd-member-nav-horizontal a:hover {
    background: #0073aa;
    color: #ffffff;
}

/* Member Information Grid */
.vnd-member-info-grid,
.vnd-info-item {
    display: grid;
    gap: 16px;
}

.vnd-member-info-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.vnd-info-item {
    grid-template-columns: 1fr 1fr;
    align-items: start;
}

.vnd-info-label {
    font-weight: 600;
    color: #333;
}

.vnd-info-value {
    color: #666;
}

/* Status Badges */
.vnd-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    background-color: rgba(0, 163, 42, 0.1);
}

.vnd-status-active {
    background-color: rgba(0, 163, 42, 0.1);
    color: #00a32a;
}

.vnd-status-inactive {
    background-color: rgba(219, 166, 23, 0.1);
    color: #dba617;
}

.vnd-status-suspended {
    background-color: rgba(214, 54, 56, 0.1);
    color: #d63638;
}

/* ========================================================================
   NEWSLETTER STYLES
   ======================================================================== */
#pdf-newsletter-viewer {
    width: 100%;
    height: 800px;      /* default for desktops 2K*/
    min-height: 800px;
    border: 1px solid #ddd; /* optional: gives a clean boundary */
    border-radius: 4px;
    overflow: hidden;   /* keeps scrollbars tidy */
}

#pdf-newsletter-viewer embed,
#pdf-newsletter-viewer iframe {
    width: 100%;
    height: 100%;
}

/* Tablet adjustments */
@media (min-width: 1025px) and (max-width: 1920px) {
    #pdf-newsletter-viewer {
        height: 600px;
        min-height: 600px;
    }
}


/* Tablet adjustments */
@media (max-width: 1024px) {
    #pdf-newsletter-viewer {
        height: 500px;
        min-height: 500px;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    #pdf-newsletter-viewer {
        height: 400px;
        min-height: 400px;
    }
}

/* Very small devices */
@media (max-width: 480px) {
    #pdf-newsletter-viewer {
        height: 300px;
        min-height: 300px;
    }
}

.vnd-member-newsletter {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.vnd-newsletter-header {
    margin-bottom: 30px;
}

.vnd-breadcrumb {
    margin-bottom: 16px;
    font-size: 14px;
    color: #666;
}

.vnd-breadcrumb a {
    color: #0073aa;
    text-decoration: none;
}

.vnd-breadcrumb a:hover {
    text-decoration: underline;
}

.vnd-breadcrumb-separator {
    margin: 0 8px;
    color: #ccc;
}

.vnd-breadcrumb-current {
    color: #333;
}

.vnd-newsletter-subtitle {
    color: #666;
    margin-top: 8px;
    font-style: italic;
}

/* Newsletter Sections */
.vnd-newsletter-section {
    background: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    margin-bottom: 24px;
    overflow: hidden;
}

.vnd-section-header {
    background: #f8f9fa;
    padding: 16px 20px;
    border-bottom: 1px solid #e1e1e1;
}

.vnd-section-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vnd-section-content {
    padding: 20px;
}

.vnd-placeholder-content {
    color: #666;
    font-style: italic;
}

.vnd-placeholder-content em {
    font-size: 12px;
    opacity: 0.8;
}

/* Newsletter Downloads */
.vnd-newsletter-downloads {
    background: #f0f6fc;
    border: 1px solid #0073aa;
    border-radius: 8px;
    padding: 20px;
    margin: 24px 0;
}

.vnd-download-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.vnd-download-icon {
    font-size: 18px;
}

.vnd-no-pdf {
    color: #666;
    font-style: italic;
}

/* Newsletter Archive */
.vnd-archive-list {
    list-style: none;
    padding: 0;
}

.vnd-archive-list li {
    padding: 8px 0;
    border-bottom: 1px solid #e1e1e1;
}

.vnd-archive-list li:last-child {
    border-bottom: none;
}

.vnd-archive-date {
    color: #666;
    font-size: 12px;
}

/* ========================================================================
   CONTACT FORM STYLES
   ======================================================================== */
.vnd-contact-info{
    margin-top: 1rem;
}

.vnd-member-contact-form {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Contact Information Grid */
.vnd-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.vnd-contact-item {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #0073aa;
}

.vnd-contact-item h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
}

.vnd-contact-item p {
    margin: 4px 0;
    font-size: 14px;
    color: #666;
}

.vnd-contact-item a {
    color: #0073aa;
    text-decoration: none;
}

.vnd-contact-item a:hover {
    text-decoration: underline;
}

/* Contact Form */
.vnd-contact-form-section {
    background: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 30px;
    margin: 30px 0;
    max-width: 800px;
    margin: 0 auto;
}

.vnd-member-info-display {
    background: #f0f6fc;
    border: 1px solid #0073aa;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 24px;
    color: #0073aa;
    font-size: 14px;
}

.vnd-field-help {
    margin: 6px 0 0 0;
    font-size: 12px;
    color: #666;
}

/* Radio Groups */
.vnd-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vnd-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.vnd-radio-label input[type="radio"] {
    margin: 0;
    width: auto;
}

.vnd-radio-help {
    font-size: 12px;
    color: #666;
    font-weight: normal;
}

/* Form Actions */
.vnd-form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Character Counter */
.vnd-counter {
    float: right;
    font-size: 11px;
    color: #999;
}

.vnd-counter-warning {
    color: #d63638;
    font-weight: 600;
}

/* Contact Form 7 Integration Styles */
.vnd-cf7-contact-form .wpcf7-form {
    margin: 0;
}

.vnd-cf7-contact-form .form-row {
    margin-bottom: 20px;
}

.vnd-cf7-contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.vnd-cf7-contact-form input[type="text"],
.vnd-cf7-contact-form input[type="email"],
.vnd-cf7-contact-form select,
.vnd-cf7-contact-form textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background-color: #fff;
    box-sizing: border-box;
}

.vnd-cf7-contact-form input[type="text"]:focus,
.vnd-cf7-contact-form input[type="email"]:focus,
.vnd-cf7-contact-form select:focus,
.vnd-cf7-contact-form textarea:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 1px #007cba;
}

.vnd-cf7-contact-form .form-actions {
    text-align: left;
    margin-top: 30px;
}

.vnd-cf7-contact-form .wpcf7-submit {
    background: #007cba;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-height: 44px;
}

.vnd-cf7-contact-form .wpcf7-submit:hover {
    background: #005a87;
}

.vnd-cf7-contact-form .wpcf7-response-output {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
}

.vnd-cf7-contact-form .wpcf7-mail-sent-ok {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.vnd-cf7-contact-form .wpcf7-validation-errors,
.vnd-cf7-contact-form .wpcf7-mail-sent-ng {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.vnd-cf7-contact-form .wpcf7-not-valid-tip {
    color: #d63638;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.vnd-cf7-contact-form .wpcf7-form-control.wpcf7-not-valid {
    border-color: #d63638;
}

.vnd-cf7-contact-form .wpcf7-spinner {
    margin-left: 8px;
}

/* Override CF7 default widths and inline attributes */
.vnd-cf7-contact-form .wpcf7-form-control-wrap {
    display: block !important;
    width: 100% !important;
}

.vnd-cf7-contact-form .wpcf7-form-control {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box;
}

.vnd-cf7-contact-form .wpcf7-text,
.vnd-cf7-contact-form .wpcf7-email,
.vnd-cf7-contact-form .wpcf7-select,
.vnd-cf7-contact-form .wpcf7-textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
}

/* Override inline size and cols attributes specifically */
.vnd-cf7-contact-form input[type="text"][size],
.vnd-cf7-contact-form input[type="email"][size],
.vnd-cf7-contact-form textarea[cols] {
    width: 100% !important;
    max-width: 100% !important;
}

/* Ensure form-row containers are full width */
.vnd-cf7-contact-form .form-row {
    width: 100%;
}

.vnd-cf7-contact-form .form-row p {
    margin: 0;
    width: 100%;
}

/* ========================================================================
   FOOTER STYLES
   ======================================================================== */

.vnd-dashboard-footer,
.vnd-newsletter-footer,
.vnd-contact-footer {
    /* AL: hidden*/
    display:none;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e1e1e1;
}

.vnd-footer-actions,
.vnd-newsletter-actions,
.vnd-contact-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    justify-content: center;
}

/* ========================================================================
   RESPONSIVE STYLES
   ======================================================================== */

@media (max-width: 768px) {
    .vnd-login-card {
        padding: 30px 20px;
    }

    .vnd-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .vnd-member-info-grid {
        grid-template-columns: 1fr;
    }

    .vnd-info-item {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .vnd-contact-grid {
        grid-template-columns: 1fr;
    }

    .vnd-member-menu,
    .vnd-member-nav-horizontal {
        /* AL: Do not pile up the menus on mobile */
        /* flex-direction: column; */
    }

    .vnd-form-actions {
        flex-direction: column;
    }

    .vnd-form-actions .vnd-button {
        width: 100%;
    }

    .vnd-footer-actions,
    .vnd-newsletter-actions,
    .vnd-contact-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .vnd-member-login-container,
    .vnd-member-dashboard,
    .vnd-member-newsletter,
    .vnd-member-contact-form {
        padding: 10px;
    }

    .vnd-login-card {
        padding: 20px 15px;
    }

    .vnd-dashboard-card,
    .vnd-contact-form-section {
        padding: 20px 16px;
    }
}

/* ========================================================================
   UTILITY CLASSES
   ======================================================================== */

.vnd-text-center {
    text-align: center;
}

.vnd-text-left {
    text-align: left;
}

.vnd-text-right {
    text-align: right;
}

.vnd-mb-0 { margin-bottom: 0; }
.vnd-mb-1 { margin-bottom: 8px; }
.vnd-mb-2 { margin-bottom: 16px; }
.vnd-mb-3 { margin-bottom: 24px; }

.vnd-mt-0 { margin-top: 0; }
.vnd-mt-1 { margin-top: 8px; }
.vnd-mt-2 { margin-top: 16px; }
.vnd-mt-3 { margin-top: 24px; }

.vnd-hidden {
    display: none;
}

.vnd-visible {
    display: block;
}

/* ========================================================================
   PRINT STYLES
   ======================================================================== */

@media print {
    .vnd-member-nav-horizontal,
    .vnd-dashboard-nav,
    .vnd-footer-actions,
    .vnd-newsletter-actions,
    .vnd-contact-actions,
    .vnd-breadcrumb,
    .vnd-button {
        display: none;
    }

    .vnd-newsletter-section,
    .vnd-dashboard-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
