/* GRC CF7 DateTimePicker v2.1 — Compact design */


/* ── CSS Variables ── */
.grc-dtp-wrapper {
    --grc-accent:    #333;
    --grc-accent-h:  #555;
    --grc-bg:        #ffffff;
    --grc-bg2:       #f8fafc;
    --grc-border:    #e2e8f0;
    --grc-text:      #1e293b;
    --grc-text-muted:#94a3b8;
    --grc-day-hover: #f1882c;
    --grc-today-c:   #2563eb;
    --grc-past-c:    #d1d5db;
    --grc-shadow:    0 4px 16px rgba(0,0,0,0.10);
    --grc-radius:    8px;
    --grc-font:      inherit; /* override via JS pentru system */
}

/* Dark theme */
.grc-dtp-wrapper.grc-dark {
    --grc-bg:        #1e293b;
    --grc-bg2:       #0f172a;
    --grc-border:    #334155;
    --grc-text:      #f1f5f9;
    --grc-text-muted:#64748b;
    --grc-day-hover: #f1882c;
    --grc-past-c:    #334155;
    --grc-shadow:    0 4px 16px rgba(0,0,0,0.40);
}

/* ── Wrapper ── */
.grc-dtp-wrapper {
    display: inline-block;
    width: 100%;
    font-family: var(--grc-font);
    position: relative;
}

/* Input hidden — trimite valoarea */
.grc-dtp-wrapper input.grc-datetimepicker {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

/* Display readonly */
.grc-dtp-display {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1px solid var(--grc-border);
    border-radius: var(--grc-radius);
    font-size: 14px;
    color: var(--grc-text);
    background: var(--grc-bg);
    cursor: default;
    margin-bottom: 8px;
    min-height: 38px;
    font-family: var(--grc-font);
}
.grc-dtp-display.placeholder { color: var(--grc-text-muted); }

.grc-dtp-time-select { background-image: none !important; }

/* ── Picker container ── */
.grc-dtp-picker {
    background: var(--grc-bg);
    border: 1px solid var(--grc-border);
    border-radius: var(--grc-radius);
    box-shadow: var(--grc-shadow);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    max-width: 100%;
    font-family: var(--grc-font);
}

/* ── Header ── */
.grc-dtp-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--grc-accent);
    color: #fff;
    padding: 8px 10px;
}
.grc-dtp-cal-header button {
    background: none;
    border: none;
    color: #fff;
    font-size: 2em;
    margin: 0;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    transition: background 0.15s;
}
.grc-dtp-cal-header button:hover { background: rgba(255,255,255,0.2); }

.grc-dtp-cal-title {
    font-size: 1.5em;
    font-weight: 600;
    flex: 1;
    text-align: center;
    pointer-events: none;
    user-select: none;
    cursor: default;
}

.grc-dtp-cal-grid .button,
.grc-dtp-cal-grid button {
    margin-bottom: 0;
}

/* ── Grid ── */
.grc-dtp-cal-grid { padding: 8px 8px 4px; }

.grc-dtp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 2px;
}
.grc-dtp-weekdays span {
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--grc-text-muted);
    padding: 2px 0;
    text-transform: uppercase;
}

.grc-dtp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}

.grc-dtp-day {
    text-align: center;
    padding: 0;
    font-size: 1.2em;
    border-radius: 4px;
    cursor: pointer;
    color: var(--grc-text);
    border: none;
    background: none;
    width: 100%;
    font-family: var(--grc-font);
    transition: background 0.1s, color 0.1s;
}
.grc-dtp-day:hover:not(.empty):not(.disabled):not(.past) {
    background: var(--grc-day-hover);
    color: #fff;
}
.grc-dtp-day.today    { font-weight: 700; color: var(--grc-today-c); }
.grc-dtp-day.selected { background: #f1882c; color: #fff !important; font-weight: 700; }
.grc-dtp-day.past     { color: var(--grc-past-c); cursor: not-allowed; }
.grc-dtp-day.empty    { cursor: default; }
.grc-dtp-day.disabled { color: var(--grc-past-c); cursor: not-allowed; text-decoration: line-through; }

/* ── Time section ── */
.grc-dtp-time-section {
    border-top: 1px solid var(--grc-border);
    padding: 8px 10px;
    background: var(--grc-bg2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.grc-dtp-time-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--grc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.grc-dtp-time-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

/* Time select dropdown */
.grc-dtp-time-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--grc-bg);
    border: 1px solid var(--grc-border);
    border-radius: 5px;
    color: var(--grc-text);
    font-size: 15px;
    font-weight: 700;
    font-family: var(--grc-font);
    padding: 4px 6px;
    cursor: pointer;
    text-align: center;
    min-width: 52px;
}
.grc-dtp-time-select:focus { outline: 2px solid var(--grc-accent); }

.grc-dtp-time-sep {
    font-size: 16px;
    font-weight: 700;
    color: var(--grc-text-muted);
    margin-bottom: 1px;
}

/* ── Confirm button (rezervat) ── */
.grc-dtp-confirm {
    display: block;
    width: calc(100% - 20px);
    margin: 0 10px 8px;
    padding: 7px;
    background: var(--grc-accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    font-family: var(--grc-font);
}
.grc-dtp-confirm:hover:not(:disabled) { background: var(--grc-accent-h); }
.grc-dtp-confirm:disabled { background: var(--grc-text-muted); cursor: not-allowed; opacity: 0.6; }
