/* ============================================
   Youngman Resource Hub — Frontend Styles
   ============================================ */

/* ------ Variables / Brand ------ */
:root {
    --yrh-orange: #E8732A;
    --yrh-orange-accent: #F78F1E;
    --yrh-orange-hover: #cf6523;
    --yrh-dark: #212121;
    --yrh-text: #ffffff;
    --yrh-text-muted: #C9C9C9;
    --yrh-border: #595959;
    --yrh-bg-light: #f9f9f9;
    --yrh-radius: 4px;
    --yrh-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ------ Layout ------ */
.yrh-form-wrap,
.yrh-dashboard,
.yrh-browse,
.yrh-profile,
.yrh-landing {
    max-width: 960px;
    margin: 0 auto;
    font-family: Helvetica, Arial, sans-serif;
    color: var(--yrh-text);
    line-height: 1.6;
}

.yrh-form-wrap {
    max-width: 560px;
}

/* ------ Notices / Messages ------ */
.yrh-notice {
    padding: 14px 18px;
    border-radius: var(--yrh-radius);
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.yrh-notice-success {
    background-color: rgba(46, 125, 50, 0.15);
    border: 1px solid #4caf50;
    color: #81c784;
}

.yrh-notice-error {
    background-color: rgba(198, 40, 40, 0.15);
    border: 1px solid #ef5350;
    color: #ef9a9a;
}

.yrh-notice-info {
    background-color: rgba(21, 101, 192, 0.15);
    border: 1px solid #42a5f5;
    color: #90caf9;
}

.yrh-messages:empty {
    display: none;
}

/* ------ Forms ------ */
.yrh-form {
    margin: 0;
}

.yrh-field {
    margin-bottom: 0;
}

/* Hide labels — we use placeholders */
.yrh-field label {
    display: none;
}

.yrh-required {
    display: none;
}

.yrh-field input[type="text"],
.yrh-field input[type="email"],
.yrh-field input[type="password"],
.yrh-field input[type="tel"],
.yrh-field input[type="url"],
.yrh-field input[type="number"],
.yrh-field select,
.yrh-field textarea {
    display: block;
    width: 100%;
    padding: 16px 0;
    font-size: 16px;
    font-family: Helvetica, Arial, sans-serif;
    border: none;
    border-bottom: 1px solid var(--yrh-border);
    border-radius: 0;
    background: transparent;
    color: var(--yrh-text);
    transition: border-color 0.2s;
    box-sizing: border-box;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.yrh-field input::placeholder,
.yrh-field textarea::placeholder {
    color: var(--yrh-text-muted);
    opacity: 1;
}

.yrh-field select {
    color: var(--yrh-text-muted);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 20px;
}

.yrh-field select option {
    background: var(--yrh-dark);
    color: var(--yrh-text);
}

/* Focus — no visual change per design */
.yrh-field input:focus,
.yrh-field select:focus,
.yrh-field textarea:focus {
    outline: none;
    border-bottom-color: var(--yrh-border);
    box-shadow: none;
}

/* Error state */
.yrh-field input.yrh-field-error {
    border-bottom-color: #ef5350;
}

.yrh-form-row {
    display: flex;
    gap: 24px;
}

.yrh-form-row--two > .yrh-field {
    flex: 1;
}

.yrh-password-hint {
    font-size: 12px;
    color: var(--yrh-text-muted);
    margin: 8px 0 10px;
}

.yrh-form-intro {
    margin: 0 0 20px;
    color: var(--yrh-text-muted);
}

.yrh-form-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: var(--yrh-text-muted);
}

.yrh-form-footer a {
    color: var(--yrh-orange-accent);
    text-decoration: none;
    font-weight: 600;
}

.yrh-form-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

/* reCAPTCHA notice */
.yrh-recaptcha-notice {
    font-family: Helvetica, Arial, sans-serif;
    font-weight: 400;
    font-size: 12px;
    color: #505050;
    line-height: 1.5;
    margin-top: 10px;
    text-align: center;
}

.yrh-recaptcha-notice a {
    color: #737373;
    border-bottom: 1px dotted;
    text-decoration: none;
}

.yrh-recaptcha-notice a:hover {
    color: var(--yrh-orange);
    border-bottom: 1px dotted var(--yrh-orange);
}

/* Alt action section (e.g. "Already have an account? Log in") */
.yrh-form-alt-action {
    margin-top: 40px;
    text-align: center;
}

.yrh-form-alt-action .yrh-form-footer {
    margin-top: 0;
    margin-bottom: 8px;
}

.yrh-form-alt-action .yrh-btn-primary {
    display: inline-flex;
    margin-top: 0;
}

/* Honeypot — hidden from view */
.yrh-hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* ------ Password Strength ------ */
.yrh-password-strength {
    display: none;
    margin-top: 6px;
    height: 20px;
}

.yrh-strength-bar {
    display: inline-block;
    height: 4px;
    width: 80px;
    border-radius: 2px;
    vertical-align: middle;
    margin-right: 8px;
}

.yrh-strength-label {
    font-size: 12px;
    vertical-align: middle;
    color: var(--yrh-text-muted);
}

.yrh-strength-bar.yrh-strength-weak { background: #ef5350; }
.yrh-strength-bar.yrh-strength-fair { background: #ff9800; }
.yrh-strength-bar.yrh-strength-good { background: #fdd835; }
.yrh-strength-bar.yrh-strength-strong { background: #66bb6a; }
.yrh-strength-bar.yrh-strength-very-strong { background: #2e7d32; }

/* ------ Buttons ------ */
.yrh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    line-height: 1.4;
    box-sizing: border-box;
}

.yrh-btn:active {
    transform: scale(0.98);
}

/* Primary submit button — matches Elementor form button */
.yrh-btn-primary {
    background-color: var(--yrh-dark);
    color: #ffffff;
    border: 2px solid var(--yrh-orange-accent);
    border-radius: 25px;
    padding: 10px 50px;
    width: auto;
    margin: 24px auto 0;
    display: flex;
}

.yrh-btn-primary:hover {
    background-color: var(--yrh-orange-accent);
    color: #ffffff;
    border-color: var(--yrh-orange-accent);
}

.yrh-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Small buttons (resource cards) */
.yrh-btn-small {
    padding: 8px 20px;
    font-size: 13px;
    background-color: var(--yrh-dark);
    color: #ffffff;
    border: 2px solid var(--yrh-orange-accent);
    border-radius: 25px;
}

.yrh-btn-small:hover {
    background-color: var(--yrh-orange-accent);
    color: #ffffff;
}

.yrh-btn-outline {
    background-color: transparent;
    border: 2px solid var(--yrh-border);
    border-radius: 25px;
    color: var(--yrh-text-muted);
}

.yrh-btn-outline:hover {
    border-color: var(--yrh-orange-accent);
    color: var(--yrh-orange-accent);
    background-color: transparent;
}

.yrh-btn-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: yrh-spin 0.6s linear infinite;
}

@keyframes yrh-spin {
    to { transform: rotate(360deg); }
}

/* ------ Success Panel (verification pending) ------ */
.yrh-success-panel {
    text-align: center;
    padding: 40px 20px;
}

.yrh-icon-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: rgba(46, 125, 50, 0.2);
    color: #81c784;
    font-size: 32px;
    margin-bottom: 20px;
}

.yrh-success-panel h3 {
    font-size: 22px;
    margin: 0 0 12px;
    color: var(--yrh-text);
}

.yrh-success-panel p {
    margin: 0 0 10px;
    color: var(--yrh-text-muted);
}

.yrh-text-muted {
    color: var(--yrh-text-muted);
    font-size: 13px;
}

/* ------ Dashboard Header ------ */
.yrh-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}

.yrh-dashboard-welcome {
    font-size: 18px;
    font-weight: 600;
    color: var(--yrh-text);
}

.yrh-dashboard-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.yrh-link {
    color: var(--yrh-orange-accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.yrh-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* ------ Card Grid ------ */
.yrh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.yrh-grid-folders {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

.yrh-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--yrh-border);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.15s, border-color 0.2s;
    text-decoration: none;
    color: var(--yrh-text);
}

.yrh-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
    border-color: var(--yrh-orange-accent);
}

/* ------ Category Card (compact folder style) ------ */
.yrh-card-category {
    flex-direction: row;
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 14px 18px;
    gap: 14px;
}

.yrh-card-category:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--yrh-orange-accent);
    box-shadow: none;
    transform: none;
}

.yrh-card-category .yrh-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: none;
}

.yrh-card-category .yrh-card-icon .yrh-svg-icon {
    width: 40px;
    height: 40px;
    color: var(--yrh-orange-accent);
}

.yrh-card-category .yrh-card-icon .yrh-card-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
}

.yrh-card-body {
    padding: 16px;
    flex: 1;
}

.yrh-card-category .yrh-card-body {
    padding: 0;
}

.yrh-card-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: var(--yrh-text);
}

.yrh-card-category .yrh-card-title {
    font-size: 15px;
    margin: 0;
}

.yrh-card-desc {
    margin: 0;
    font-size: 13px;
    color: var(--yrh-text-muted);
}

/* ------ Resource Card (vertical stacked layout) ------ */
.yrh-card-resource {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    gap: 0;
}

.yrh-card-resource .yrh-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    background: rgba(255, 255, 255, 0.03);
}

.yrh-card-resource .yrh-card-icon .yrh-svg-icon {
    width: 56px;
    height: 56px;
    color: var(--yrh-orange-accent);
}

.yrh-card-resource .yrh-card-icon .yrh-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yrh-card-resource .yrh-card-icon--preview {
    height: 160px;
    background: var(--yrh-dark);
}

.yrh-card-resource .yrh-card-body {
    flex: 1;
    padding: 14px 16px 8px;
    min-width: 0;
}

.yrh-card-resource .yrh-card-title {
    font-size: 14px;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.4;
    margin-bottom: 6px;
}

.yrh-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.yrh-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--yrh-text-muted);
    letter-spacing: 0.5px;
}

.yrh-badge--pdf { background: rgba(198, 40, 40, 0.2); color: #ef9a9a; }
.yrh-badge--doc,
.yrh-badge--docx { background: rgba(21, 101, 192, 0.2); color: #90caf9; }
.yrh-badge--xls,
.yrh-badge--xlsx { background: rgba(46, 125, 50, 0.2); color: #81c784; }
.yrh-badge--mp4 { background: rgba(106, 27, 154, 0.2); color: #ce93d8; }
.yrh-badge--zip { background: rgba(230, 81, 0, 0.2); color: #ffab91; }

.yrh-card-size {
    font-size: 12px;
    color: var(--yrh-text-muted);
}

.yrh-card-actions {
    display: flex;
    gap: 8px;
    padding: 0 16px 14px;
}

/* ------ Inline Video Player ------ */
.yrh-grid-resources:has(.yrh-inline-video) {
    display: block;
}

.yrh-inline-video {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.yrh-inline-video-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--yrh-text);
    margin: 16px 0 0;
}

.yrh-video-player {
    width: 100%;
    max-width: 800px;
    border-radius: 8px;
    background: #000;
}

/* ------ Breadcrumbs ------ */
.yrh-breadcrumbs {
    font-size: 14px;
    margin-bottom: 20px;
    color: var(--yrh-text-muted);
}

.yrh-breadcrumb-link {
    color: var(--yrh-orange-accent);
    text-decoration: none;
}

.yrh-breadcrumb-link:hover {
    color: #fff;
    text-decoration: underline;
}

.yrh-breadcrumb-sep {
    margin: 0 8px;
    color: var(--yrh-border);
}

.yrh-breadcrumb-current {
    font-weight: 600;
    color: var(--yrh-text);
}

/* ------ Browse ------ */
.yrh-browse-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 8px;
}

.yrh-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: 1px solid var(--yrh-border);
    border-radius: 50%;
    color: var(--yrh-text-muted);
    transition: border-color 0.2s, color 0.2s, background-color 0.2s;
    text-decoration: none;
}

.yrh-back-btn .yrh-svg-icon {
    width: 18px;
    height: 18px;
}

.yrh-back-btn:hover {
    border-color: var(--yrh-orange-accent);
    color: var(--yrh-orange-accent);
    background: rgba(247, 143, 30, 0.1);
}

.yrh-browse-title {
    font-size: 24px;
    margin: 0;
    color: var(--yrh-text);
}

.yrh-browse-desc {
    margin: 0 0 24px;
    color: var(--yrh-text-muted);
}

.yrh-divider {
    border: none;
    border-top: 1px solid var(--yrh-border);
    margin: 32px 0 0;
}

.yrh-divider + .yrh-grid {
    margin-top: 32px;
}

.yrh-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--yrh-text-muted);
    font-size: 15px;
}

/* ------ Profile ------ */
.yrh-profile-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.yrh-profile-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--yrh-border);
    border-radius: 8px;
    padding: 24px;
}

.yrh-profile-section h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: var(--yrh-text);
}

/* ------ Responsive: Tablet ------ */
@media (max-width: 1024px) {
    .yrh-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }
}

/* ------ Responsive: Mobile ------ */
@media (max-width: 767px) {
    .yrh-form-row {
        flex-direction: column;
        gap: 0;
    }

    .yrh-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .yrh-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .yrh-card-actions .yrh-btn-small {
        flex: 1;
        text-align: center;
    }

    .yrh-profile-columns {
        grid-template-columns: 1fr;
    }

    .yrh-profile-section {
        padding: 16px;
    }
}
