/* Material-Inspired Components */
/* This file recreates Angular Material's look without the framework */

/* Universal box-sizing */
* {
    box-sizing: border-box;
}

/* Cards */
.card {
    background: var(--pp-surface);
    color: var(--pp-text);
    border-radius: 10px;
    box-shadow: 0 2px 1px -1px rgba(0,0,0,.2),
    0 1px 1px 0 rgba(0,0,0,.14),
    0 1px 3px 0 rgba(0,0,0,.12);
    padding: 24px;
    margin: 16px 0;
}

.card.card-padding {
    padding: 24px;
}

/* Input Containers */
.input-container {
    position: relative;
    margin: 20px 0 25px 0;
    width: 100%;
}

.input-container input,
.input-container select {
    width: 100%;
    padding: 8px 0;
    font-size: 16px;
    color: var(--pp-text);
    border: none;
    border-bottom: 1px solid var(--pp-border);
    background: transparent;
    outline: none;
    font-family: 'Red Hat Display', sans-serif;
    box-sizing: border-box;
}

.input-container input:focus,
.input-container select:focus {
    border-bottom: 2px solid #ff8c00;
}

.input-container label {
    position: absolute;
    top: 8px;
    left: 0;
    font-size: 16px;
    color: var(--pp-text-muted);
    pointer-events: none;
    transition: all 0.2s ease;
    font-weight: 400;
}

.input-container input:focus ~ label,
.input-container input:not(:placeholder-shown) ~ label,
.input-container select:focus ~ label,
.input-container select:not([value=""]) ~ label,
.input-container.has-value label {
    top: -18px;
    font-size: 12px;
    color: var(--pp-text);
    font-weight: 600;
}

.input-container input:focus ~ label {
    color: #ff8c00;
}

.input-container .hint {
    font-size: 12px;
    color: var(--pp-text-muted);
    margin-top: 4px;
    min-height: 16px;
}

.input-container .hint.error {
    color: #f44336;
}

/* Select Dropdowns */
.input-container select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23757575' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 20px;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-flex; /* Changed from inline-block to inline-flex */
    align-items: center;  /* Vertically centers the content */
    justify-content: center; /* Horizontally centers the content */
    font-size: 14px;
    font-weight: 500;
    text-transform: capitalize;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
    font-family: 'Red Hat Display', sans-serif;
    outline: none;
    min-width: 88px;
    padding: 5px 16px;
    margin: 6px 8px;
    text-decoration: none;
    min-height: 40px;
    /* Default so variant-less buttons don't inherit the browser's grey UA
       background (a stray light pill on dark). Variants set their own fill. */
    background: transparent;
    color: inherit;
}

/* Secondary buttons that aren't raised (e.g. the menu Log Out) — give them a
   real surface + border so they don't fall back to the UA background. */
.btn-secondary {
    background: var(--pp-surface);
    color: var(--pp-text);
    border: 1px solid var(--pp-border);
}
.btn-block{
    width:100%;
}

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

.btn-raised {
    box-shadow: 0 2px 2px 0 rgba(0,0,0,.14),
    0 3px 1px -2px rgba(0,0,0,.2),
    0 1px 5px 0 rgba(0,0,0,.12);
}

.btn-raised:hover:not(:disabled) {
    box-shadow: 0 4px 5px 0 rgba(0,0,0,.14),
    0 1px 10px 0 rgba(0,0,0,.12),
    0 2px 4px -1px rgba(0,0,0,.2);
}

.btn-primary {
    color: #ff8c00;
    background: transparent;
}

.btn-primary.btn-raised {
    background-color: #ff8c00;
    color: white; /* preferred over #323f4d */
}

.btn-primary.btn-raised:disabled {
    background-color: #ff8c004a;
    color: #7c8d9f;
}

.btn-primary.btn-raised:not(:disabled):hover {
    background-color: #fba02f;
}

.btn-secondary.btn-raised {
    background-color: #fff;
    color: #323f4d;
    border: 2px solid #323f4d;
    box-sizing: border-box;
}

.btn-secondary.btn-raised:not(:disabled):hover {
    background-color: #c2d4ef;
}

.btn:first-of-type{
    margin-left:0; /* the first button doesn't need to be indented */
}

/* Layout Helpers */
.layout-row {
    display: flex;
    flex-direction: row;
    gap: 16px;
}

.layout-column {
    display: flex;
    flex-direction: column;
}

.flex {
    flex: 1;
}


/* Responsive */
@media (max-width: 599px) {
    /* Force all rows to be columns on mobile */
    .layout-row.layout-xs-column,
    .layout-row {
        flex-direction: column !important;
        gap: 0;
    }

    /* Hide on mobile */
    .hide-xs {
        display: none;
    }

    .btn {
        width: 100%;
        margin: 6px 0;
        box-sizing: border-box;
    }

    .card {
        margin: 8px;
        padding: 16px;
    }

    .input-container {
        margin: 15px 0 20px 0;
    }

    h1 {
        font-size: 28px;
        margin-bottom: 20px;
    }

    h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    /* Make sure the inner content takes full width */
    .ohc-inner {
        padding: 0 8px;
    }

    /* Inputs should be full width */
    .input-container input,
    .input-container select {
        width: 100%;
        box-sizing: border-box;
    }
}


h3 {
    font-size: 18px;
    margin-bottom: 15px;
}


@media (min-width: 600px) {
    .layout-row.layout-gt-xs-row {
        flex-direction: row;
    }

    /* On desktop, allow inputs in rows to sit side by side */
    .layout-row .input-container {
        flex: 1;
    }
}

@media (min-width: 600px) and (max-width: 959px) {
    /* Tablet styles */
    .ohc-inner {
        padding: 0 24px;
    }

    .card {
        padding: 20px;
    }
}

/* Dialog/Alert */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--pp-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.dialog {
    background: var(--pp-surface);
    color: var(--pp-text);
    border-radius: 2px;
    min-width: 280px;
    max-width: 80vw;
    max-height: 80vh;
    box-shadow: 0 11px 15px -7px rgba(0,0,0,.2),
    0 24px 38px 3px rgba(0,0,0,.14),
    0 9px 46px 8px rgba(0,0,0,.12);
    padding: 24px;
}

.dialog h2 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 500;
}

.dialog p {
    margin: 0 0 24px 0;
    color: var(--pp-text-muted);
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Show/hide utilities */
[ng-show="false"],
[data-ng-show="false"] {
    display: none;
}