﻿/* Container for the QR display */
.qr-display-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem auto;
    flex-wrap: wrap;
}

/* Wrapper for the QR display */
.qr-display {
    background-color: #ffffff;
    border-radius: 10px;
/*    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);*/
    width: 100%;
    display: flex;
    flex-direction: row;
    overflow: hidden;
}

/* QR code frame styling */
.qr-frame {
    background-color: #f1f3f6;
    padding: 25px;
    border-radius: 10px 0 0 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    border-right: 1px solid #eaeef5;
    flex-direction: column;
}

    .qr-frame img {
        width: 100%;
        max-width: 350px;
        height: auto;
        border-radius: 8px;
        margin-bottom: 15px;
    }

/* Information section styling */
.qr-info {
    padding: 25px 30px;
    color: #333;
    flex: 1;
    background-color: #fcfdff;
}

.info-row {
    padding: 1em;
}

    .info-row .label {
        font-weight: 600;
        color: #5a6a85;
        min-width: 140px;
        flex: 0 0 140px;
        margin-right: 1em;
        font-size: 15px;
    }

    /* Value styling */
    .info-row .value {
        font-weight: 500;
        color: #2e3b52;
        flex: 1;
    }


:root {
    --primary: #4361ee;
    --primary-light: #4895ef;
    --secondary: #3f37c9;
    --dark: #212121;
    --light: #f8f9fa;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --success: #4cc9a0;
    --danger: #ee4266;
    --warning: #ffa630;
    --border-radius: 12px;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: #f5f7fb;
    color: var(--dark);
    line-height: 1.5;
}

.qr-scanner-container {
    width: 600px;
    margin: 2rem auto;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    background-color: white;
    transition: all 0.3s ease;
}

.scanner-section,
.time-management-section {
    width: 100%;
    padding: 24px;
    background-color: white;
    border-radius: var(--border-radius);
}

.scanner-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 20px;
}

    .scanner-header h3 {
        color: var(--dark);
        margin-bottom: 8px;
        font-weight: 700;
        font-size: 1.5rem;
    }

    .scanner-header h5,
    .time-management-section h4 {
        color: var(--dark);
        margin-bottom: 16px;
        font-weight: 600;
        font-size: 1.1rem;
    }

.date-pill {
    background-color: var(--gray-light);
    color: var(--dark);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 8px;
    display: inline-block;
}

.video-container {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
    border-radius: var(--border-radius);
    background-color: #f0f2f5;
    margin-bottom: 24px;
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.1);
}

.scanner-border {
    width: 220px;
    height: 220px;
    border: 2px solid var(--primary);
    border-radius: 12px;
    box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.6);
    position: relative;
}

/*    .scanner-border::before {
        content: '';
        position: absolute;
        width: 40px;
        height: 40px;
        border-top: 5px solid var(--primary);
        border-left: 5px solid var(--primary);
        top: -5px;
        left: -5px;
        border-radius: 8px 0 0 0;
    }

    .scanner-border::after {
        content: '';
        position: absolute;
        width: 40px;
        height: 40px;
        border-bottom: 5px solid var(--primary);
        border-right: 5px solid var(--primary);
        bottom: -5px;
        right: -5px;
        border-radius: 0 0 8px 0;
    }*/

.section-title {
    font-size: 1rem;
    color: var(--gray);
    margin-bottom: 12px;
    font-weight: 500;
}

.input-group {
    position: relative;
    margin-bottom: 16px;
}

.code-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: all 0.3s;
    background-color: var(--light);
}

    .code-input:focus {
        outline: none;
        border-color: var(--primary-light);
        box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
    }

    .code-input::placeholder {
        color: #adb5bd;
    }

.button {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    width: 100%;
}

    .button:hover {
        background-color: var(--secondary);
/*        transform: translateY(-2px);*/
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .button:active {
        transform: translateY(0);
    }

.divider {
    height: 1px;
    background-color: var(--gray-light);
    margin: 24px 0;
    border: none;
}

/* Employee Info Section */
.employee-info {
    background-color: var(--light);
    padding: 16px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.data-row {
    display: flex;
    margin-bottom: 8px;
}

.label {
    color: var(--gray);
    font-weight: 500;
    width: 100px;
    flex-shrink: 0;
}

.value {
    color: var(--dark);
    font-weight: 600;
}

/* Punch Buttons */
.punch-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.punch-button {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

    .punch-button:hover {
        background-color: var(--secondary);
/*        transform: translateY(-2px);*/
    }

    .punch-button.clockin {
        background-color: var(--success);
    }

    .punch-button.clockout {
        background-color: var(--danger);
    }

    .punch-button.lunchout {
        background-color: var(--warning);
    }

    .punch-button.lunchin {
        background-color: var(--primary-light);
    }

/* Punch Records */
.punch-list {
    background-color: var(--light);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.punch-record {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-light);
}

    .punch-record:last-child {
        border-bottom: none;
    }

.punch-type {
    background-color: var(--primary);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

    .punch-type.clock-in {
        background-color: var(--success);
    }

    .punch-type.clock-out {
        background-color: var(--danger);
    }

    .punch-type.break-start {
        background-color: var(--warning);
    }

    .punch-type.break-end {
        background-color: var(--primary-light);
    }

.punch-time {
    font-weight: 600;
    color: var(--dark);
}

.punch-code {
    color: var(--gray);
    font-size: 0.875rem;
}

.no-properties {
    padding: 20px;
    text-align: center;
    color: var(--gray);
    background-color: var(--light);
    border-radius: var(--border-radius);
    font-style: italic;
}

.video-container video {
    height: 100%;
}

.keys-section {
    padding: 1.25rem;
    background-color: #f1f3f6;
    border-radius: 8px;
}
.keys-section-info {
    padding: 1.25rem;
    background-color: aliceblue;
    border-radius: 8px;
}

.key-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(90, 106, 133, 0.1);
}

    .key-item:last-child {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

.key-label {
    font-weight: 600;
    color: #5a6a85;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.key-value-container {
    margin-top: 1rem;
    display: flex;
    align-items: stretch; /* Changed from center to stretch */
    width: 100%;
}

.key-value {
    flex: 1;
    font-family: monospace;
    font-size: 1.125rem;
    font-weight: 700;
    color: #2e3b52;
    padding: 0.75rem;
    background-color: white;
    border-radius: 6px 0 0 6px;
    border: 1px solid #eaeef5;
    border-right: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    user-select: all;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center; /* Center text vertically */
}

.copy-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.75rem;
    background-color: white;
    border: 1px solid #eaeef5;
    border-left: none;
    border-radius: 0 6px 6px 0;
    color: #5a6a85;
    cursor: pointer;
    transition: all 0.2s ease;
    /* Remove fixed height properties to match parent */
    height: auto;
    min-height: auto;
}

    .copy-button:hover {
        background-color: #f8f9fa;
        color: var(--primary, #4361ee);
    }

    .copy-button.copied {
        background-color: #e6f4ea;
        color: #28a745;
    }

    /* Animation for the button click */
    .copy-button:active {
        transform: scale(0.95);
    }

.email-section {
    margin-top: 10px; /* Adds spacing between QR code and button */
    text-align: center;
}

.email-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: auto;
}

    .email-button:hover {
        background-color: var(--secondary);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

@media (max-width: 767px) {
    .qr-display-container {
        margin: 1rem auto;
    }

    .qr-display {
        flex-direction: column; /* Stack QR code and info vertically on small screens */
        padding: 1rem; /* Add padding to the container */
    }

    .qr-frame {
        padding: 20px; /* Reduce padding around QR code */
        width: 100%; /* Allow QR frame to take full width */
        border-right: none; /* Remove border between QR code and info */
        border-radius: 10px; /* Full rounded corners for mobile */
    }

        .qr-frame img {
            max-width: 100%; /* Allow image to scale with screen size */
            margin-bottom: 10px;
        }

    .qr-info {
        padding: 0; /* Reduce padding for mobile */
        flex: 1;
        width: 100%; /* Ensure the info section takes full width */
    }

    /* Button adjustments for mobile */
    .email-button {
        width: 100%; /* Make button full width on mobile */
        padding: 14px 16px;
        font-size: 1.1rem;
    }

    .info-row .label {
        min-width: 100px; /* Reduce min-width for mobile */
        margin-right: 0.5rem; /* Add some spacing */
    }

    .info-row .value {
        font-size: 14px; /* Reduce font size for value on small screens */
    }
}