/**
 * Subnet Mask Calculator - Page Specific Styles
 *
 * Mobile-first design for CalcSubnetMask tool
 * Version: 1.0
 * Updated: 2025-10-31
 */

/* 入力フォーム - コンパクトかつタッチフレンドリー */
.subnet-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Note: Input/select styling now handled by common components (input.phtml, select.phtml)
   which use .form-control and .form-select classes from mobile-first.css */

.subnet-form .button {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.subnet-form input[type="reset"] {
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--gray-200);
    color: var(--gray-700);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    min-height: 50px;
}

.subnet-form input[type="reset"]:hover {
    background: var(--gray-300);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.subnet-form input[type="reset"]:active {
    transform: translateY(0);
}

/* 結果表示 - カード形式で見やすく */
.result-card {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 3px solid #10b981;
    border-radius: 16px;
    padding: 20px;
    margin-top: 24px;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
}

.result-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #065f46;
    margin-bottom: 16px;
    text-align: center;
}

.result-grid {
    display: grid;
    gap: 12px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.result-row.highlight {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 2px solid #fb923c;
}

.result-label {
    font-weight: 600;
    color: #065f46;
    font-size: 14px;
}

.result-value {
    font-weight: 700;
    color: #047857;
    font-size: 15px;
    text-align: right;
    word-break: break-all;
}

.result-row.highlight .result-value {
    color: #c2410c;
    font-size: 16px;
}

/* タブレット・デスクトップ向け調整 */
@media (min-width: 640px) {
    .subnet-form {
        gap: 20px;
    }

    .result-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .result-row:nth-child(1),
    .result-row:nth-child(4),
    .result-row:nth-child(6) {
        grid-column: 1 / -1;
    }
}

@media (min-width: 768px) {
    .subnet-form .button {
        gap: 16px;
    }

    .result-card {
        padding: 28px;
    }

    .result-label {
        font-size: 15px;
    }

    .result-value {
        font-size: 16px;
    }
}

/* モバイル専用調整 */
@media (max-width: 639px) {
    .subnet-form input[type="reset"] {
        width: 100%;
        max-width: 300px;
    }

    .result-card {
        padding: 16px;
    }

    .result-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 12px;
    }

    .result-value {
        text-align: left;
        width: 100%;
    }
}
