/**
 * 文件名称: public/assets/css/style.css
 * 功能描述: 普通用户端全局样式表
 * 遵守指令要求：提供完整的脚本注释和解释
 */

/* 全局基础重置 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f4f6f9;
    color: #333;
    padding: 20px;
}

/* 母版布局核心容器 */
.container {
    max-width: 450px;
    margin: 40px auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 标题与副标题样式 */
.title {
    color: #2b579a;
    margin-bottom: 10px;
    font-size: 22px;
}

.subtitle {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

/* 信息卡片框样式 */
.card-box {
    background: #e9ecef;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #495057;
    line-height: 1.6;
}

/* 按钮组与按钮基础样式 */
.btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn {
    text-align: center;
    padding: 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    display: block;
}

.btn-primary {
    background: #007bff;
    color: #fff;
}

/* 表单组合及间距 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #333;
    font-weight: bold;
}

/* 输入框通用样式 */
.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

/* 占满整行的按钮样式调整 */
.btn-block {
    width: 100%;
    border: none;
    font-size: 15px;
    cursor: pointer;
    margin-bottom: 10px;
}

/* 返回链接样式 */
.back-link {
    display: block;
    text-align: center;
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    padding: 8px;
}

/* 柜子列表容器 */
.cabinet-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

/* 单个柜格选择项卡片 */
.cabinet-item {
    display: flex;
    align-items: center;
    padding: 14px;
    background: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cabinet-item:hover {
    background: #e9ecef;
    border-color: #80bdff;
}

/* 隐藏原生单选框，美化整体卡片交互 */
.cabinet-item input[type="radio"] {
    margin-right: 12px;
    transform: scale(1.1);
}

/* 柜格详细文本样式 */
.cabinet-info {
    font-size: 14px;
    color: #333;
}

.cabinet-info strong {
    color: #2b579a;
}

.cabinet-meta {
    font-size: 12px;
    color: #6c757d;
    margin-top: 2px;
}

/* 提示文字通用样式 */
.alert-text {
    color: #dc3545;
    text-align: center;
    font-size: 14px;
    padding: 10px;
}

/* 占满整行的提交按钮样式 */
.btn-block {
    width: 100%;
    border: none;
    font-size: 15px;
    cursor: pointer;
    margin-bottom: 10px;
}

/* 返回链接样式 */
.back-link {
    display: block;
    text-align: center;
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    padding: 8px;
}

/* 柜格矩阵容器：自动排列成多列（例如每行4列） */
.cabinet-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

/* 单个格口格子样式 */
.grid-cell {
    background: #f8f9fa;
    border: 2px solid #ced4da;
    border-radius: 6px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

/* 隐藏原生的单选按钮 */
.grid-cell input[type="radio"] {
    display: none;
}

/* 格子内部编号文字 */
.cell-no {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    display: block;
    margin-bottom: 4px;
}

/* 格子内部状态文字 */
.cell-status {
    font-size: 11px;
    color: #6c757d;
}

/* 状态一：已被占用（灰色，不可点击） */
.grid-cell.occupied {
    background-color: #e9ecef;
    border-color: #dee2e6;
    cursor: not-allowed;
    opacity: 0.6;
}

.grid-cell.occupied .cell-no,
.grid-cell.occupied .cell-status {
    color: #adb5bd;
}

/* 状态二：空闲可用（悬停效果） */
.grid-cell.free:hover {
    border-color: #80bdff;
    background-color: #e7f1ff;
}

/* 状态三：用户点击选中（高亮绿色） */
.grid-cell.selected {
    background-color: #d4edda !important;
    border-color: #28a745 !important;
}

.grid-cell.selected .cell-no {
    color: #155724;
}

.grid-cell.selected .cell-status {
    color: #28a745;
    font-weight: bold;
}

/* 绿色成功按钮样式（替代内联样式） */
.btn-success {
    display: block;
    width: 100%;
    background-color: #28a745;
    color: #fff;
    text-align: center;
    padding: 12px 10px;
    border-radius: 4px;
    text-decoration: none;
    box-sizing: border-box;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-success:hover {
    background-color: #218838;
    color: #fff;
}

/* 订单详情灰底卡片容器 */
.order-info-card {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 20px;
}

/* 卡片内部信息行 */
.info-row {
    font-size: 14px;
    color: #495057;
    margin-bottom: 10px;
    line-height: 1.5;
}

.info-row:last-child {
    margin-bottom: 0;
}

/* 强调高亮文本 */
.info-row strong {
    color: #212529;
}

/* 押金金额绿色高亮 */
.text-deposit {
    color: #28a745;
    font-weight: bold;
    font-size: 15px;
}